name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_Tuple16_setFields_rdh | /**
* Sets new values to all fields of the tuple.
*
* @param f0
* The value for field 0
* @param f1
* The value for field 1
* @param f2
* The value for field 2
* @param f3
* The value for field 3
* @param f4
* The value for field 4
* @param f5
* The value for field 5
* @param f6
* The valu... | 3.26 |
flink_FirstValueAggFunction_createAccumulator_rdh | // --------------------------------------------------------------------------------------------
// Runtime
// --------------------------------------------------------------------------------------------
@Override
public RowData createAccumulator() {
GenericRowData acc = new GenericRowData(2);
acc.setField(0, ... | 3.26 |
flink_FirstValueAggFunction_m0_rdh | // --------------------------------------------------------------------------------------------
// Planning
// --------------------------------------------------------------------------------------------
@Override
public List<DataType> m0() {
return Collections.singletonList(valueDataType);
} | 3.26 |
flink_ObjectArrayTypeInfo_getInfoFor_rdh | /**
* Creates a new {@link org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo} from a {@link TypeInformation} for the component type.
*
* <p>This must be used in cases where the complete type of the array is not available as a
* {@link java.lang.reflect.Type} or {@link java.lang.Class}.
*/
@SuppressWarnings("... | 3.26 |
flink_ObjectArrayTypeInfo_m0_rdh | // --------------------------------------------------------------------------------------------
@PublicEvolving
public static <T, C> ObjectArrayTypeInfo<T, C> m0(Class<T> arrayClass, TypeInformation<C> componentInfo) {
checkNotNull(arrayClass);
checkNotNull(componentInfo);
checkArgument(arrayClass.isArray... | 3.26 |
flink_ObjectArrayTypeInfo_isBasicType_rdh | // --------------------------------------------------------------------------------------------
@Override
@PublicEvolving
public boolean isBasicType() {
return false;
} | 3.26 |
flink_StateDescriptor_getName_rdh | // ------------------------------------------------------------------------
/**
* Returns the name of this {@code StateDescriptor}.
*/
public String getName() {
return name;
} | 3.26 |
flink_StateDescriptor_getSerializer_rdh | /**
* Returns the {@link TypeSerializer} that can be used to serialize the value in the state. Note
* that the serializer may initialized lazily and is only guaranteed to exist after calling
* {@link #initializeSerializerUnlessSet(ExecutionConfig)}.
*/
public TypeSerializer<T> getSerializer() {
TypeSerializer<T> ... | 3.26 |
flink_StateDescriptor_hashCode_rdh | // ------------------------------------------------------------------------
// Standard Utils
// ------------------------------------------------------------------------
@Override
public final int hashCode() {
return name.hashCode() + (31 * getClass().hashCode());
} | 3.26 |
flink_StateDescriptor_writeObject_rdh | // ------------------------------------------------------------------------
// Serialization
// ------------------------------------------------------------------------
private void writeObject(final ObjectOutputStream out) throws IOException {
// write all the non-transient fields
out.defaultWriteObject();
// write th... | 3.26 |
flink_StateDescriptor_enableTimeToLive_rdh | /**
* Configures optional activation of state time-to-live (TTL).
*
* <p>State user value will expire, become unavailable and be cleaned up in storage depending on
* configured {@link StateTtlConfig}.
*
* <p>If enabling the TTL configuration, the field {@link StateDescriptor#defaultValue} will be
* invalid.
*
... | 3.26 |
flink_StateDescriptor_initializeSerializerUnlessSet_rdh | /**
* Initializes the serializer, unless it has been initialized before.
*
* @param executionConfig
* The execution config to use when creating the serializer.
*/
public void initializeSerializerUnlessSet(ExecutionConfig executionConfig) {
if (serializerAtomicReference.get() == null) {
checkState(typ... | 3.26 |
flink_StateDescriptor_isSerializerInitialized_rdh | // ------------------------------------------------------------------------
/**
* Checks whether the serializer has been initialized. Serializer initialization is lazy, to
* allow parametrization of serializers with an {@link ExecutionConfig} via {@link #initializeSerializerUnlessSet(ExecutionConfig)}.
*
* @return ... | 3.26 |
flink_StateDescriptor_getDefaultValue_rdh | /**
* Returns the default value.
*/
public T getDefaultValue() {
if (defaultValue != null) {
TypeSerializer<T> serializer = serializerAtomicReference.get();
if (serializer != null) {
return serializer.copy(defaultValue);
} else {
throw new IllegalStateException("Serializer not yet initiali... | 3.26 |
flink_YarnJobClusterEntrypoint_main_rdh | // ------------------------------------------------------------------------
// The executable entry point for the Yarn Application Master Process
// for a single Flink job.
// ------------------------------------------------------------------------
public static void main(String[] args) {
LOG.warn("Job Clusters are... | 3.26 |
flink_SqlTimeSerializer_snapshotConfiguration_rdh | // --------------------------------------------------------------------------------------------
// Serializer configuration snapshotting
// --------------------------------------------------------------------------------------------
@Override
public TypeSerializerSnapshot<Time> snapshotConfiguration() {
return new ... | 3.26 |
flink_ExpressionConverter_extractValue_rdh | /**
* Extracts a value from a literal. Including planner-specific instances such as {@link DecimalData}.
*/
@SuppressWarnings("unchecked")
public static <T> T extractValue(ValueLiteralExpression literal, Class<T> clazz) {
final Optional<Object> v17 = literal.getValueAs(Object.class);
if (!v17.isPresent()) {t... | 3.26 |
flink_FileChannelBoundedData_create_rdh | // ------------------------------------------------------------------------
public static FileChannelBoundedData create(Path filePath, int memorySegmentSize) throws IOException {
final FileChannel fileChannel = FileChannel.open(filePath, StandardOpenOption.CREATE_NEW, StandardOpenOption.WRITE);
return new File... | 3.26 |
flink_LegacySourceTransformation_setBoundedness_rdh | /**
* Mutable for legacy sources in the Table API.
*/
public void setBoundedness(Boundedness boundedness) {
this.boundedness = boundedness;
} | 3.26 |
flink_LegacySourceTransformation_getOperatorFactory_rdh | /**
* Returns the {@code StreamOperatorFactory} of this {@code LegacySourceTransformation}.
*/
public StreamOperatorFactory<T> getOperatorFactory() {
return operatorFactory;
} | 3.26 |
flink_WindowedStream_evictor_rdh | /**
* Sets the {@code Evictor} that should be used to evict elements from a window before emission.
*
* <p>Note: When using an evictor window performance will degrade significantly, since
* incremental aggregation of window results cannot be used.
*/
@PublicEvolving
public WindowedStream<T, K, W> evictor(Evictor<?... | 3.26 |
flink_WindowedStream_reduce_rdh | /**
* Applies the given window function to each window. The window function is called for each
* evaluation of the window for each key individually. The output of the window function is
* interpreted as a regular non-windowed stream.
*
* <p>Arriving data is incrementally aggregated using the given reducer.
*
* @... | 3.26 |
flink_WindowedStream_allowedLateness_rdh | /**
* Sets the time by which elements are allowed to be late. Elements that arrive behind the
* watermark by more than the specified time will be dropped. By default, the allowed lateness
* is {@code 0L}.
*
* <p>Setting an allowed lateness is only valid for event-time windows.
*/
@PublicEvolving
public WindowedSt... | 3.26 |
flink_WindowedStream_minBy_rdh | /**
* Applies an aggregation that gives the minimum element of every window of the data stream by
* the given position. If more elements have the same minimum value the operator returns either
* the first or last one depending on the parameter setting.
*
* @param positionToMinBy
* The position to minimize
* @p... | 3.26 |
flink_WindowedStream_process_rdh | /**
* Applies the given window function to each window. The window function is called for each
* evaluation of the window for each key individually. The output of the window function is
* interpreted as a regular non-windowed stream.
*
* <p>Note that this function requires that all data in the windows is buffered ... | 3.26 |
flink_WindowedStream_aggregate_rdh | /**
* Applies the given window function to each window. The window function is called for each
* evaluation of the window for each key individually. The output of the window function is
* interpreted as a regular non-windowed stream.
*
* <p>Arriving data is incrementally aggregated using the given aggregate functi... | 3.26 |
flink_WindowedStream_apply_rdh | /**
* Applies the given window function to each window. The window function is called for each
* evaluation of the window for each key individually. The output of the window function is
* interpreted as a regular non-windowed stream.
*
* <p>Arriving data is incrementally aggregated using the given reducer.
*
* @... | 3.26 |
flink_WindowedStream_maxBy_rdh | /**
* Applies an aggregation that gives the maximum element of every window of the data stream by
* the given position. If more elements have the same maximum value the operator returns either
* the first or last one depending on the parameter setting.
*
* @param positionToMaxBy
* The position to maximize by
*... | 3.26 |
flink_WindowedStream_trigger_rdh | /**
* Sets the {@code Trigger} that should be used to trigger window emission.
*/
@PublicEvolving
public WindowedStream<T, K, W> trigger(Trigger<? super T, ? super W>
trigger) {
builder.trigger(trigger);
return this;
} | 3.26 |
flink_WindowedStream_min_rdh | /**
* Applies an aggregation that gives the minimum value of the pojo data stream at the given
* field expression for every window.
*
* <p>A field * expression is either the name of a public field or a getter method with
* parentheses of the {@link DataStream}S underlying type. A dot can be used to drill down into... | 3.26 |
flink_WindowedStream_max_rdh | /**
* Applies an aggregation that gives the maximum value of the pojo data stream at the given
* field expression for every window. A field expression is either the name of a public field or
* a getter method with parentheses of the {@link DataStream DataStreams} underlying type. A dot
* can be used to drill down i... | 3.26 |
flink_WindowedStream_sum_rdh | /**
* Applies an aggregation that sums every window of the pojo data stream at the given field for
* every window.
*
* <p>A field expression is either the name of a public field or a getter method with
* parentheses of the stream's underlying type. A dot can be used to drill down into objects, as
* in {@code "fie... | 3.26 |
flink_WindowedStream_getAllowedLateness_rdh | // -------------------- Testing Methods --------------------
@VisibleForTesting
long getAllowedLateness() {
return builder.getAllowedLateness();
} | 3.26 |
flink_TopSpeedWindowing_main_rdh | /**
* An example of grouped stream windowing where different eviction and trigger policies can be used.
* A source fetches events from cars containing their id, their current speed (kmh), overall elapsed
* distance (m) and a timestamp. The streaming example triggers the top speed of each car every x
* meters elapse... | 3.26 |
flink_RetryPredicates_createExceptionTypePredicate_rdh | /**
* Creates a predicate on given exception type.
*
* @param exceptionClass
* @return predicate on exception type.
*/
public static ExceptionTypePredicate createExceptionTypePredicate(@Nonnull
Class<? extends Throwable> exceptionClass) {
return new ExceptionTypePredicate(exceptionClass);
} | 3.26 |
flink_RemoteStreamEnvironment_getHost_rdh | /**
* Gets the hostname of the master (JobManager), where the program will be executed.
*
* @return The hostname of the master
*/
public String getHost() {return configuration.getString(JobManagerOptions.ADDRESS);
} | 3.26 |
flink_RemoteStreamEnvironment_getClientConfiguration_rdh | /**
*
* @deprecated This method is going to be removed in the next releases.
*/
@Deprecatedpublic Configuration getClientConfiguration() {
return configuration;
} | 3.26 |
flink_RemoteStreamEnvironment_getPort_rdh | /**
* Gets the port of the master (JobManager), where the program will be executed.
*
* @return The port of the master
*/
public int getPort() {return configuration.getInteger(JobManagerOptions.PORT);
} | 3.26 |
flink_TupleTypeInfo_getBasicTupleTypeInfo_rdh | // --------------------------------------------------------------------------------------------
@PublicEvolving
public static <X extends Tuple> TupleTypeInfo<X> getBasicTupleTypeInfo(Class<?>... basicTypes) {
if ((basicTypes == null) || (basicTypes.length == 0)) {
... | 3.26 |
flink_TupleTypeInfo_equals_rdh | // --------------------------------------------------------------------------------------------
@Override
public boolean equals(Object obj) {
if (obj instanceof TupleTypeInfo) {@SuppressWarnings("unchecked")
TupleTypeInfo<T> other = ((TupleTypeInfo<T>) (obj));
return (other.canEqual(this) && super.e... | 3.26 |
flink_CompressedSerializedValue_toString_rdh | // --------------------------------------------------------------------------------------------
@Override
public String toString() {
return String.format("Compressed Serialized Value [byte array length: %d]", getSize());
} | 3.26 |
flink_CompressedSerializedValue_fromObject_rdh | /**
* Constructs a compressed serialized value for the given object.
*
* @param object
* the object to serialize and compress
* @throws NullPointerException
* if object is null
* @throws IOException
* exception during serialization and compression
*/
public static <T> CompressedSerializedValue<T> fromObj... | 3.26 |
flink_CompressedSerializedValue_deserializeValue_rdh | /**
* Decompress and deserialize the data to get the original object.
*
* @param loader
* the classloader to deserialize
* @return the deserialized object
* @throws IOException
* exception during decompression and deserialization
* @throws ClassNotFoundException
* if class is not found in the classloader... | 3.26 |
flink_CompressedSerializedValue_getSize_rdh | /**
* Returns the size of the compressed serialized data.
*/
public int getSize() {
return getByteArray().length;
} | 3.26 |
flink_CompressedSerializedValue_fromBytes_rdh | /**
* Construct a compressed serialized value with a serialized byte array.
*
* <p>The byte array must be the result of serialization and compression with {@link InstantiationUtil#serializeObjectAndCompress}.
*
* @param compressedSerializedData
* the compressed serialized byte array
... | 3.26 |
flink_InternalSerializers_create_rdh | /**
* Creates a {@link TypeSerializer} for internal data structures of the given {@link RowType}.
*/public static <T> RowDataSerializer create(RowType type) {
return ((RowDataSerializer) (createInternal(type)));
} | 3.26 |
flink_StandardSinkTopologies_addGlobalCommitter_rdh | /**
* Adds a global committer to the pipeline that runs as final operator with a parallelism of
* one.
*/
public static <CommT> void addGlobalCommitter(DataStream<CommittableMessage<CommT>> committables, SerializableSupplier<Committer<CommT>> committerFactory, SerializableSupplier<SimpleVersionedSerializer<CommT>> c... | 3.26 |
flink_InternalOperatorMetricGroup_putVariables_rdh | // ------------------------------------------------------------------------
// Component Metric Group Specifics
// ------------------------------------------------------------------------
@Override
protected void putVariables(Map<String, String> variables) {
variables.put(ScopeFormat.SCOPE_OPERATOR_ID, String.value... | 3.26 |
flink_InternalOperatorMetricGroup_getTaskIOMetricGroup_rdh | // ------------------------------------------------------------------------
public final TaskIOMetricGroup getTaskIOMetricGroup() {
return parent.getIOMetricGroup();
} | 3.26 |
flink_JobManagerRunnerResult_getInitializationFailure_rdh | /**
* This method returns the initialization failure.
*
* @return the initialization failure
* @throws IllegalStateException
* if the result is not an initialization failure
*/
public Throwable getInitializationFailure() {
Preconditions.checkState(isInitializationFailure());
return failure;
} | 3.26 |
flink_BlockerSync_releaseBlocker_rdh | /**
* Lets the blocked thread continue.
*/
public void releaseBlocker() {
synchronized(lock) {
blockerReleased = true;lock.notifyAll();
}
} | 3.26 |
flink_BlockerSync_blockNonInterruptible_rdh | /**
* Blocks until {@link #releaseBlocker()} is called. Notifies the awaiting thread that waits in
* the method {@link #awaitBlocker()}.
*/
public void blockNonInterruptible() {
synchronized(lock) {
blockerReady = true;
lock.notifyAll();
while (!blockerReleased) {
try {
... | 3.26 |
flink_BlockerSync_block_rdh | /**
* Blocks until {@link #releaseBlocker()} is called or this thread is interrupted. Notifies the
* awaiting thread that waits in the method {@link #awaitBlocker()}.
*/
public void block() throws InterruptedException {
synchronized(lock) {
blockerReady = true;
lock.notifyAll();
while (!b... | 3.26 |
flink_BlockerSync_awaitBlocker_rdh | /**
* Waits until the blocking thread has entered the method {@link #block()} or {@link #blockNonInterruptible()}.
*/
public void awaitBlocker() throws InterruptedException {
synchronized(lock) {
while (!blockerReady) {
lock.wait();
}
}
} | 3.26 |
flink_SkipListKeySerializer_serialize_rdh | /**
* Serialize the key and namespace to bytes. The format is - int: length of serialized namespace
* - byte[]: serialized namespace - int: length of serialized key - byte[]: serialized key
*/
byte[] serialize(K key, N namespace) {
// we know that the segment contains a byte[], because it is created
// in t... | 3.26 |
flink_SkipListKeySerializer_serializeToSegment_rdh | /**
* Serialize the key and namespace to bytes. The format is - int: length of serialized namespace
* - byte[]: serialized namespace - int: length of serialized key - byte[]: serialized key
*/
MemorySegment serializeToSegment(K key, N namespace) {
outputStream.reset();
try {
// serialize namespace
... | 3.26 |
flink_SkipListKeySerializer_serializeNamespace_rdh | /**
* Serialize the namespace to bytes.
*/
byte[] serializeNamespace(N namespace) {
outputStream.reset();
try {
namespaceSerializer.serialize(namespace, outputView);
} catch (IOException e) {throw new RuntimeException("serialize namespace failed", e);
}
return outputStream.toByteArray();
} | 3.26 |
flink_SkipListKeySerializer_deserializeNamespace_rdh | /**
* Deserialize the namespace from the byte buffer which stores skip list key.
*
* @param memorySegment
* the memory segment which stores the skip list key.
* @param offset
* the start position of the skip list key in the byte buffer.
* @param len
* length of the skip list key.
*/
N deserializeNamespac... | 3.26 |
flink_SkipListKeySerializer_deserializeKey_rdh | /**
* Deserialize the partition key from the byte buffer which stores skip list key.
*
* @param memorySegment
* the memory segment which stores the skip list key.
* @param offset
* the start position of the skip list key in the byte buffer.
* @param len
* length of the skip list key.
*/
K deserializeKey(... | 3.26 |
flink_SkipListKeySerializer_getSerializedKeyAndNamespace_rdh | /**
* Gets serialized key and namespace from the byte buffer.
*
* @param memorySegment
* the memory segment which stores the skip list key.
* @param offset
* the start position of the skip list key in the byte buffer.
* @return tuple of serialized key and namespace.
*/
Tuple2<byte[], byte[]> getSerializedKe... | 3.26 |
flink_WritableSavepoint_write_rdh | /**
* Write out a new or updated savepoint.
*
* @param path
* The path to where the savepoint should be written.
*/
public final void write(String path) {
final Path savepointPath = new Path(path);
List<BootstrapTransformationWithID<?>> newOperatorTransformations = metadata.getNewOperators();
DataSet... | 3.26 |
flink_WritableSavepoint_removeOperator_rdh | /**
* Drop an existing operator from the savepoint.
*
* @param uid
* The uid of the operator.
* @return A modified savepoint.
*/
@SuppressWarnings("unchecked")
public F removeOperator(String uid) {
metadata.removeOperator(uid);
return ((F) (this));
} | 3.26 |
flink_WritableSavepoint_withConfiguration_rdh | /**
* Sets a configuration that will be applied to the stream operators used to bootstrap a new
* savepoint.
*
* @param option
* metadata information
* @param value
* value to be stored
* @param <T>
* type of the value to be stored
* @return The modified savepoint.
*/
@SuppressWarnings("unchecked")publ... | 3.26 |
flink_WritableSavepoint_withOperator_rdh | /**
* Adds a new operator to the savepoint.
*
* @param uid
* The uid of the operator.
* @param transformation
* The operator to be included.
* @return The modified savepoint.
*/
@SuppressWarnings("unchecked")
public <T> F withOperator(String uid, BootstrapTransformation<T> transformation) {
metadata.add... | 3.26 |
flink_TaskExecutorResourceUtils_generateDefaultSlotResourceProfile_rdh | /**
* This must be consist with {@link org.apache.flink.runtime.resourcemanager.slotmanager.SlotManagerUtils#generateDefaultSlotResourceProfile}.
*/
@VisibleForTesting
public static ResourceProfile generateDefaultSlotResourceProfile(TaskExecutorResourceSpec taskExecutorResourceSpec, int numberOfSlots) {
final Resourc... | 3.26 |
flink_LookupFunction_eval_rdh | /**
* Invoke {@link #lookup} and handle exceptions.
*/
public final void eval(Object... keys) {
GenericRowData keyRow = GenericRowData.of(keys);
try {
Collection<RowData> lookup = lookup(keyRow);
if (lookup == null) {
return; }
lookup.forEach(this::collect);
} catch (I... | 3.26 |
flink_CliFrontendParser_getRunOptionsWithoutDeprecatedOptions_rdh | // --------------------------------------------------------------------------------------------
// Help
// --------------------------------------------------------------------------------------------
private static Options getRunOptionsWithoutDeprecatedOptions(Options options) {
return
getProgramSpecificOptions... | 3.26 |
flink_CliFrontendParser_printCustomCliOptions_rdh | /**
* Prints custom cli options.
*
* @param formatter
* The formatter to use for printing
* @param runOptions
* True if the run options should be printed, False to print only general
* options
*/
private static void printCustomCliOptions(Collection<CustomCommandLine> customCommandLines, HelpFormatter for... | 3.26 |
flink_CliFrontendParser_mergeOptions_rdh | /**
* Merges the given {@link Options} into a new Options object.
*
* @param optionsA
* options to merge, can be null if none
* @param optionsB
* options to merge, can be null if none
* @return */
public static Options mergeOptions(@Nullable
Options optionsA, @Nullable
Options optionsB) {
final Options... | 3.26 |
flink_CliFrontendParser_parse_rdh | // --------------------------------------------------------------------------------------------
public static CommandLine parse(Options options, String[] args, boolean stopAtNonOptions) throws CliArgsException {final DefaultParser parser = new DefaultParser();
try {
return parser.parse(options, args, stopAt... | 3.26 |
flink_CliFrontendParser_printHelp_rdh | /**
* Prints the help for the client.
*/
public static void printHelp(Collection<CustomCommandLine> customCommandLines) {
System.out.println("./flink <ACTION> [OPTIONS] [ARGUMENTS]");
System.out.println();
System.out.println("The following actions are available:");
printHelpForRun(customCommandLines);... | 3.26 |
flink_OneInputTransformation_getStateKeySelector_rdh | /**
* Returns the {@code KeySelector} that must be used for partitioning keyed state in this
* Operation.
*
* @see #setStateKeySelector
*/
public KeySelector<IN, ?> getStateKeySelector() {
return stateKeySelector;
} | 3.26 |
flink_OneInputTransformation_setStateKeySelector_rdh | /**
* Sets the {@link KeySelector} that must be used for partitioning keyed state of this
* operation.
*
* @param stateKeySelector
* The {@code KeySelector} to set
*/
public void setStateKeySelector(KeySelector<IN, ?> stateKeySelector) {
this.stateKeySelector = stateKeySelector;
updateManagedMemorySta... | 3.26 |
flink_OneInputTransformation_getOperatorFactory_rdh | /**
* Returns the {@code StreamOperatorFactory} of this Transformation.
*/
public StreamOperatorFactory<OUT> getOperatorFactory() {
return operatorFactory;
} | 3.26 |
flink_OneInputTransformation_getInputType_rdh | /**
* Returns the {@code TypeInformation} for the elements of the input.
*/
public TypeInformation<IN> getInputType() {
return input.getOutputType();
} | 3.26 |
flink_EventSerializer_toBuffer_rdh | // ------------------------------------------------------------------------
// Buffer helpers
// ------------------------------------------------------------------------
public static Buffer toBuffer(AbstractEvent event, boolean hasPriority) throws IOException {
final ByteBuffer v34 = EventSerializer.toSerializedEvent... | 3.26 |
flink_EventSerializer_toSerializedEvent_rdh | // ------------------------------------------------------------------------
// Serialization Logic
// ------------------------------------------------------------------------
public static ByteBuffer toSerializedEvent(AbstractEvent event) throws IOException {
final Class<?> eventClass
= event.getClass();
if... | 3.26 |
flink_KeyGroupRange_of_rdh | /**
* Factory method that also handles creation of empty key-groups.
*
* @param startKeyGroup
* start of the range (inclusive)
* @param endKeyGroup
* end of the range (inclusive)
* @return the key-group from start to end or an empty key-group range.
*/
public static KeyGroupRange of(int startKeyGroup, in... | 3.26 |
flink_KeyGroupRange_getStartKeyGroup_rdh | /**
*
* @return The first key-group in the range.
*/
public int getStartKeyGroup() {
return startKeyGroup;
} | 3.26 |
flink_KeyGroupRange_contains_rdh | /**
* Checks whether or not a single key-group is contained in the range.
*
* @param keyGroup
* Key-group to check for inclusion.
* @return True, only if the key-group is in the range.
*/
@Override
public boolean contains(int keyGroup) {
return (keyGroup >= startKeyGroup) && (keyGroup <= endKeyGroup);
} | 3.26 |
flink_KeyGroupRange_getIntersection_rdh | /**
* Create a range that represent the intersection between this range and the given range.
*
* @param other
* A KeyGroupRange to intersect.
* @return Key-group range that is the intersection between this and the given key-group range.
*/public KeyGroupRange getIntersection(KeyGroupRange other) {
int start... | 3.26 |
flink_KeyGroupRange_getNumberOfKeyGroups_rdh | /**
*
* @return The number of key-groups in the range
*/
@Override
public int getNumberOfKeyGroups() {
return (1 + endKeyGroup) - startKeyGroup;
} | 3.26 |
flink_KeyGroupRange_getEndKeyGroup_rdh | /**
*
* @return The last key-group in the range.
*/
public int getEndKeyGroup() {
return endKeyGroup;
} | 3.26 |
flink_OutputFileConfig_getPartPrefix_rdh | /**
* The prefix for the part name.
*/
public String getPartPrefix() {return partPrefix;
} | 3.26 |
flink_OutputFileConfig_getPartSuffix_rdh | /**
* The suffix for the part name.
*/ public String getPartSuffix() {
return partSuffix;
} | 3.26 |
flink_DefaultJobLeaderIdService_m0_rdh | /**
* Checks whether the service has been started.
*
* @return True if the service has been started; otherwise false
*/
public boolean m0() {
return jobLeaderIdActions != null;
} | 3.26 |
flink_HsResultPartition_setupInternal_rdh | // Called by task thread.
@Override
protected void setupInternal() throws IOException {
if (isReleased()) {
throw new IOException("Result partition has been released.");
}
this.fileDataManager.setup();
this.memoryDataManager = new HsMemoryDataManager(isBroadcastOnly ? 1 : numSubpartitions, netwo... | 3.26 |
flink_FlinkAggregateExpandDistinctAggregatesRule_convertSingletonDistinct_rdh | /**
* Converts an aggregate with one distinct aggregate and one or more non-distinct aggregates to
* multi-phase aggregates (see reference example below).
*
* @param relBuilder
* Contains the input relational expression
* @param aggregate
* Original aggregate
* @param argLists
* Arguments and filters to ... | 3.26 |
flink_FlinkAggregateExpandDistinctAggregatesRule_createSelectDistinct_rdh | /**
* Given an {@link org.apache.calcite.rel.core.Aggregate} and the ordinals of the arguments to a
* particular call to an aggregate function, creates a 'select distinct' relational expression
* which projects the group columns and those arguments but nothing else.
*
* <p>For example, given
*
* <blockquote>
*
... | 3.26 |
flink_FlinkAggregateExpandDistinctAggregatesRule_convertMonopole_rdh | /**
* Converts an aggregate relational expression that contains just one distinct aggregate
* function (or perhaps several over the same arguments) and no non-distinct aggregate
* functions.
*/private RelBuilder convertMonopole(RelBuilder relBuilder, Aggregate aggregate, List<Integer> argList, int filterArg) {
// F... | 3.26 |
flink_FlinkAggregateExpandDistinctAggregatesRule_doRewrite_rdh | /**
* Converts all distinct aggregate calls to a given set of arguments.
*
* <p>This method is called several times, one for each set of arguments. Each time it is
* called, it generates a JOIN to a new SELECT DISTINCT relational expression, and modifies the
* set of top-level calls.
*
* @param aggregate
* Or... | 3.26 |
flink_FlinkAggregateExpandDistinctAggregatesRule_onMatch_rdh | // ~ Methods ----------------------------------------------------------------
public void onMatch(RelOptRuleCall call) {
final Aggregate aggregate = call.rel(0);if (!AggregateUtil.containsAccurateDistinctCall(aggregate.getAggCallList())) {
return;
}
// Check unsupported aggre... | 3.26 |
flink_TypedResult_empty_rdh | // --------------------------------------------------------------------------------------------
public static <T> TypedResult<T> empty() {
return new TypedResult<>(ResultType.EMPTY, null);
} | 3.26 |
flink_ParquetVectorizedInputFormat_clipParquetSchema_rdh | /**
* Clips `parquetSchema` according to `fieldNames`.
*/
private MessageType clipParquetSchema(GroupType parquetSchema, Collection<Integer> unknownFieldsIndices) {
Type[] types = new Type[projectedFields.length];
if (isCaseSensitive) {for (int i = 0; i < projectedFields.length; ++i) {
String fiel... | 3.26 |
flink_ParquetVectorizedInputFormat_createReadableVectors_rdh | /**
* Create readable vectors from writable vectors. Especially for decimal, see {@link ParquetDecimalVector}.
*/private ColumnVector[] createReadableVectors(WritableColumnVector[] writableVectors) {ColumnVector[] vectors = new ColumnVector[writableVectors.length];
for (int i = 0; i
< writableVectors.length... | 3.26 |
flink_ParquetVectorizedInputFormat_nextBatch_rdh | /**
* Advances to the next batch of rows. Returns false if there are no more.
*/
private boolean nextBatch(ParquetReaderBatch<T> batch) throws IOException {
for (WritableColumnVector v : batch.writableVectors) {
v.reset();
}
batch.columnarBatch.setNumRows(0);
if (rowsReturn... | 3.26 |
flink_SupportsRowLevelUpdate_getRowLevelUpdateMode_rdh | /**
* Planner will rewrite the update statement to query base on the {@link RowLevelUpdateMode}, keeping the query of update unchanged by default(in `UPDATED_ROWS`
* mode), or changing the query to union the updated rows and the other rows (in `ALL_ROWS`
* mode).
*
* <p>Take the following SQL as an example:
*
* ... | 3.26 |
flink_TableSinkBase_getFieldTypes_rdh | /**
* Returns the field types of the table to emit.
*/
@Override
public TypeInformation<?>[] getFieldTypes() {
if (fieldTypes.isPresent())
{
return fieldTypes.get();
} else {
throw new
IllegalStateException("Table sink must be configured to retrieve field types.");
}
}
/**
* ... | 3.26 |
flink_TableSinkBase_getFieldNames_rdh | /**
* Returns the field names of the table to emit.
*/
@Override
public String[] getFieldNames() {
if (fieldNames.isPresent()) {
return fieldNames.get();
} else {
throw new IllegalStateException("Table sink must be configured to retrieve field names.");
}} | 3.26 |
flink_WindowReader_process_rdh | /**
* Reads window state generated without any preaggregation such as {@code WindowedStream#apply}
* and {@code WindowedStream#process}.
*
* @param uid
* The uid of the operator.
* @param readerFunction
* The window reader function.
* @param keyType
* The key type of the window.
* @param stateType
* ... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.