name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_JoinOperator_projectTuple15_rdh | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> ProjectJoin<... | 3.26 |
flink_JoinOperator_projectTuple11_rdh | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5,
T6, T7, T8, T9, T10> ProjectJoin<I1, I2, Tuple11<T0, T1... | 3.26 |
flink_JoinOperator_projectTuple20_rdh | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17,... | 3.26 |
flink_JoinOperator_projectTupleX_rdh | // --------------------------------------------------------------------------------------------
// BEGIN_OF_TUPLE_DEPENDENT_CODE
// GENERATED FROM org.apache.flink.api.java.tuple.TupleGenerator.
/**
* Chooses a projectTupleX according to the length of {@link org.apache.flink.api.java.operators.JoinOperator.JoinProject... | 3.26 |
flink_JoinOperator_projectTuple1_rdh | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/ public <T0> ProjectJoin<I1, I2, Tuple1<T0>>
projectTuple1() {
TypeInformation<?>[] fTy... | 3.26 |
flink_JoinOperator_equalTo_rdh | /**
* Continues a Join transformation and defines the fields of the second join {@link DataSet} that should be used as join keys.
*
* <p>The resulting {@link DefaultJoin} wraps each pair of joining elements into a
* {@link Tuple2}, with the element of the first input being the first field of the
* tuple and the el... | 3.26 |
flink_JoinOperator_extractFieldTypes_rdh | // END_OF_TUPLE_DEPENDENT_CODE
// -----------------------------------------------------------------------------------------
private TypeInformation<?>[] extractFieldTypes(int[] fields) {
TypeInformation<?>[] fieldTypes = new TypeInformation[fields.length];
for (int i = 0; i < fields.length; i++) {
... | 3.26 |
flink_JoinOperator_projectTuple19_rdh | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17... | 3.26 |
flink_JoinOperator_projectTuple5_rdh | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4> ProjectJoin<I1, I2, Tuple5<T0, T1, T2, T3, T4>> projectTup... | 3.26 |
flink_JoinOperator_projectTuple17_rdh | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Proj... | 3.26 |
flink_JoinOperator_projectTuple13_rdh | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> ProjectJoin<I1, I2, Tupl... | 3.26 |
flink_JoinOperator_projectFirst_rdh | /**
* Continues a ProjectJoin transformation and adds fields of the first join input.
*
* <p>If the first join input is a {@link Tuple} {@link DataSet}, fields can be selected by
* their index. If the first join input is not a Tuple DataSet, no parameters should be
* passed.
*
* <p>Fields of the first and second... | 3.26 |
flink_JoinOperator_projectTuple22_rdh | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17,... | 3.26 |
flink_JoinOperator_projectTuple3_rdh | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2> ProjectJoin<I1, I2, Tuple3<T0, T1, T2>> projectTuple3() {
TypeInfor... | 3.26 |
flink_JoinOperator_projectTuple7_rdh | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6> ProjectJoin<I1, I2, Tuple7<T0, T1, T2, T3, T4, T5,... | 3.26 |
flink_JoinOperator_projectTuple2_rdh | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1> ProjectJoin<I1, I2, Tuple2<T0, T1>> projectTuple2() {
TypeInformation<?... | 3.26 |
flink_JoinOperator_projectTuple6_rdh | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5> ProjectJoin<I1, I2, Tuple6<T0, T1, T2, T3, T4, T5>> pro... | 3.26 |
flink_JoinOperator_projectTuple16_rdh | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> ProjectJo... | 3.26 |
flink_JoinOperator_withPartitioner_rdh | /**
* Sets a custom partitioner for this join. The partitioner will be called on the join keys to
* determine the partition a key should be assigned to. The partitioner is evaluated on both
* join inputs in the same way.
*
* <p>NOTE: A custom partitioner can only be used with single-field join keys, not with
* co... | 3.26 |
flink_JoinOperator_projectTuple12_rdh | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6, T7,
T8, T9, T10, T11> ProjectJoin<I1, I2, Tuple12<... | 3.26 |
flink_JoinOperator_projectTuple23_rdh | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17,... | 3.26 |
flink_TableOperatorWrapper_isClosed_rdh | /**
* Checks if the wrapped operator has been closed.
*
* <p>Note that this method must be called in the task thread.
*/
public boolean isClosed()
{
return closed;
} | 3.26 |
flink_NumericSummaryAggregator_aggregate_rdh | /**
* Add a value to the current aggregation.
*/
@Override
public void aggregate(T value) {
if (value == null) {
nullCount++;
} else if (isNan(value)) {
nanCount++;}
else if (isInfinite(value)) {
infinityCount++;
} else {
nonMissingCount++;
... | 3.26 |
flink_NumericSummaryAggregator_combine_rdh | /**
* combine two aggregations.
*/
@Override
public void combine(Aggregator<T, NumericColumnSummary<T>> otherSameType) {
NumericSummaryAggregator<T> other = ((NumericSummaryAggregator<T>) (otherSameType));nullCount += other.nullCount;
nanCount
+= other.nanCount;
infinityCount += other.infinityCount;
if (nonMissingCo... | 3.26 |
flink_Pattern_m0_rdh | /**
* Specifies that this pattern is optional for a final match of the pattern sequence to happen.
*
* @return The same pattern as optional.
* @throws MalformedPatternException
* if the quantifier is not applicable to this pattern.
*/
public Pattern<T, F> m0() {
checkIfPreviousPatternGreedy();
quantifier.option... | 3.26 |
flink_Pattern_next_rdh | /**
* Appends a new group pattern to the existing one. The new pattern enforces strict temporal
* contiguity. This means that the whole pattern sequence matches only if an event which matches
* this pattern directly follows the preceding matching event. Thus, there cannot be any events
* in between two matching eve... | 3.26 |
flink_Pattern_within_rdh | /**
* Defines the maximum time interval in which a matching pattern has to be completed in order to
* be considered valid. This interval corresponds to the maximum time gap between events.
*
* @param withinType
* Type of the within interval between events
* @param windowTime
* Time of the matching window
* ... | 3.26 |
flink_Pattern_subtype_rdh | /**
* Applies a subtype constraint on the current pattern. This means that an event has to be of
* the given subtype in order to be matched.
*
* @param subtypeClass
* Class of the subtype
* @param <S>
* Type of the subtype
* @return The same pattern with the new subtype constraint
*/public <S extends F> Pa... | 3.26 |
flink_Pattern_or_rdh | /**
* Adds a condition that has to be satisfied by an event in order to be considered a match. If
* another condition has already been set, the new one is going to be combined with the previous
* with a logical {@code OR}. In other case, this is going to be the only condition.
... | 3.26 |
flink_Pattern_times_rdh | /**
* Specifies that the pattern can occur between from and to times with time interval corresponds
* to the maximum time gap between previous and current event for each times.
*
* @param from
* number of times matching event must appear at least
* @param to
* number of times matching event must appear at mo... | 3.26 |
flink_Pattern_notFollowedBy_rdh | /**
* Appends a new pattern to the existing one. The new pattern enforces that there is no event
* matching this pattern between the preceding pattern and succeeding this one.
*
* <p><b>NOTE:</b> There has to be other pattern after this one.
*
* @param name
* Name of the new pattern
* @return A new pattern wh... | 3.26 |
flink_Pattern_m1_rdh | /**
* Specifies exact number of times that this pattern should be matched and time interval
* corresponds to the maximum time gap between previous and current event for each times.
*
* @param times
* number of times matching event must appear
* @param windowTime
* time of the matching window between times
*... | 3.26 |
flink_Pattern_getAfterMatchSkipStrategy_rdh | /**
*
* @return the pattern's {@link AfterMatchSkipStrategy.SkipStrategy} after match.
*/
public AfterMatchSkipStrategy getAfterMatchSkipStrategy() {
return afterMatchSkipStrategy;
} | 3.26 |
flink_Pattern_greedy_rdh | /**
* Specifies that this pattern is greedy. This means as many events as possible will be matched
* to this pattern.
*
* @return The same pattern with {@link Quantifier#greedy} set to true.
* @throws MalformedPatternException
* if the quantifier is not applicable to this pattern.
*/public Pattern<T, F> greedy... | 3.26 |
flink_Pattern_where_rdh | /**
* Adds a condition that has to be satisfied by an event in order to be considered a match. If
* another condition has already been set, the new one is going to be combined with the previous
* with a logical {@code AND}. In other case, this is going to be the only condition.
*
* @param condition
* The condit... | 3.26 |
flink_Pattern_until_rdh | /**
* Applies a stop condition for a looping state. It allows cleaning the underlying state.
*
* @param untilCondition
* a condition an event has to satisfy to stop collecting events into
* looping state
* @return The same pattern with applied untilCondition
*/
public Pattern<T, F> until(IterativeCondition<F... | 3.26 |
flink_Pattern_m2_rdh | /**
* Appends a new group pattern to the existing one. The new pattern enforces non-strict temporal
* contiguity. This means that a matching event of this pattern and the preceding matching event
* might be interleaved with other events which are ignored.
*
* @param group
* the pattern to append
* @return A ne... | 3.26 |
flink_Pattern_followedBy_rdh | /**
* Appends a new group pattern to the existing one. The new pattern enforces non-strict temporal
* contiguity. This means that a matching event of this pattern and the preceding matching event
* might be interleaved with other events which are ignored.
*
* @param group
* the pattern to append
* @return A ne... | 3.26 |
flink_Pattern_followedByAny_rdh | /**
* Appends a new pattern to the existing one. The new pattern enforces non-strict temporal
* contiguity. This means that a matching event of this pattern and the preceding matching event
* might be interleaved with other events which are ignored.
*
* @param name
* Name of the new pattern
* @return A new pat... | 3.26 |
flink_Pattern_begin_rdh | /**
* Starts a new pattern sequence. The provided pattern is the initial pattern of the new
* sequence.
*
* @param group
* the pattern to begin with
* @return the first pattern of a pattern sequence
*/
public static <T, F extends T> GroupPattern<T, F> begin(Pattern<T, F> group) {
return new GroupPattern<>(n... | 3.26 |
flink_DistributedCache_getFile_rdh | // ------------------------------------------------------------------------
public File getFile(String name) {if (name == null) {
throw new NullPointerException("name must not be null");
}
Future<Path> future = cacheCopyTasks.get(name);
if (future == null) {
throw new IllegalArgumentExcepti... | 3.26 |
flink_DistributedCache_parseCachedFilesFromString_rdh | /**
* Parses a list of distributed cache entries encoded in a string. Can be used to parse a config
* option described by {@link org.apache.flink.configuration.PipelineOptions#CACHED_FILES}.
*
* <p>See {@link org.apache.flink.configuration.PipelineOptions#CACHED_FILES} for the format.
*
* @param files
* List o... | 3.26 |
flink_DistributedCache_writeFileInfoToConfig_rdh | // ------------------------------------------------------------------------
// Utilities to read/write cache files from/to the configuration
// ------------------------------------------------------------------------
public static void writeFileInfoToConfig(String name, DistributedCacheEntry e, Configuration conf) {
... | 3.26 |
flink_MutableConfig_of_rdh | /**
* Creates a new {@link Configuration}.
*
* @param config
* A readable configuration.
* @return A mutable Configuration.
*/
public static Configuration of(ReadableConfig config) {
if (!(config instanceof Configuration)) {
throw new IllegalStateException("Unexpected implementation of ReadableConfi... | 3.26 |
flink_ManagedTableFactory_discoverManagedTableFactory_rdh | /**
* Discovers the unique implementation of {@link ManagedTableFactory} without identifier.
*/static ManagedTableFactory discoverManagedTableFactory(ClassLoader classLoader) {
return FactoryUtil.discoverManagedTableFactory(classLoader, ManagedTableFactory.class);
} | 3.26 |
flink_WindowAggregateQueryOperation_getSize_rdh | /**
* Size of a {@link WindowType#TUMBLE} or {@link WindowType#SLIDE} window. Empty for {@link WindowType#SESSION} window.
*
* @return size of a window
*/
public Optional<ValueLiteralExpression> getSize() {
return Optional.of(size);
} | 3.26 |
flink_WindowAggregateQueryOperation_getSlide_rdh | /**
* Slide of {@link WindowType#SLIDE} window. Empty for other windows.
*
* @return slide of a slide window
*/
public Optional<ValueLiteralExpression> getSlide() {return Optional.of(slide);
} | 3.26 |
flink_ArrayResultIterator_next_rdh | // -------------------------------------------------------------------------
// Result Iterator Methods
// -------------------------------------------------------------------------
@Nullable
@Override
public RecordAndPosition<E> next() {
if (pos < num) {
recordAndPosition.setNext(records[pos++]);
re... | 3.26 |
flink_ArrayResultIterator_set_rdh | // -------------------------------------------------------------------------
// Setting
// -------------------------------------------------------------------------
/**
* Sets the records to be returned by this iterator. Each record's {@link RecordAndPosition}
* will have the same offset (for {@link RecordAndPosition... | 3.26 |
flink_ZooKeeperLeaderElectionHaServices_cleanupZooKeeperPaths_rdh | /**
* Cleans up leftover ZooKeeper paths.
*/
private void cleanupZooKeeperPaths() throws Exception {
deleteOwnedZNode();
tryDeleteEmptyParentZNodes();
} | 3.26 |
flink_ZooKeeperLeaderElectionHaServices_tryDeleteEmptyParentZNodes_rdh | /**
* Tries to delete empty parent znodes.
*
* <p>IMPORTANT: This method can be removed once all supported ZooKeeper versions support the
* container {@link org.apache.zookeeper.CreateMode}.
*
* @throws Exception
* if the deletion fails for other reason than {@link KeeperException.NotEmptyException}
*/
privat... | 3.26 |
flink_ZooKeeperLeaderElectionHaServices_createLeaderRetrievalService_rdh | // ///////////////////////////////////////////////
// LeaderElection/-Retrieval-related methods
// ///////////////////////////////////////////////
@Override
protected LeaderRetrievalService
createLeaderRetrievalService(String componentId) {
// Maybe use a single service for leader retrieval
return ZooKeeperUtil... | 3.26 |
flink_GSCommitRecoverableSerializer_deserializeCommitRecoverable_rdh | /**
* Deserializes a commit recoverable from the input stream.
*
* @param dataInputStream
* The input stream
* @return The commit recoverable
* @throws IOException
* On underlying failure
*/
static GSCommitRecoverable deserializeCommitRecoverable(DataInputStream dataInputStream) throws IOException {
// ... | 3.26 |
flink_GSCommitRecoverableSerializer_getVersion_rdh | /**
* The serializer version. Note that, if this changes, then the version of {@link GSResumeRecoverableSerializer} must also change, because it uses this class to serialize
* itself, in part.
*
* @return The serializer version.
*/
@Override
public int getVersion() {
return f0;
} | 3.26 |
flink_GSCommitRecoverableSerializer_serializeCommitRecoverable_rdh | /**
* Writes a commit recoverable to a data output stream.
*
* @param recoverable
* The commit recoverable
* @param dataOutputStream
* The data output stream
* @throws IOException
* On underlyilng failure
*/
static void serializeCommitRecoverable(GSCommitRecoverable recoverable, DataOutputStream dataOutp... | 3.26 |
flink_OneShotLatch_trigger_rdh | /**
* Fires the latch. Code that is blocked on {@link #await()} will now return.
*/
public void trigger() {
synchronized(lock)
{
triggered = true;lock.notifyAll();
}
} | 3.26 |
flink_OneShotLatch_await_rdh | /**
* Waits until {@link OneShotLatch#trigger()} is called. Once {@code #trigger()} has been called
* this call will always return immediately.
*
* <p>If the latch is not triggered within the given timeout, a {@code TimeoutException} will be
* thrown after the timeout.
*
* <p>A timeout value of zero means infini... | 3.26 |
flink_OneShotLatch_awaitQuietly_rdh | /**
* Calls {@link #await(long, TimeUnit)} and transforms any {@link InterruptedException} or
* {@link TimeoutException} into a {@link RuntimeException}.
*/
public void awaitQuietly(long timeout, TimeUnit timeUnit) {
try {
await(timeout, timeUnit);
} catch (InterruptedException | TimeoutException... | 3.26 |
flink_OneShotLatch_reset_rdh | /**
* Resets the latch so that {@link #isTriggered()} returns false.
*/
public void reset() {
synchronized(lock) {
triggered = false;
}
} | 3.26 |
flink_YarnResourceManagerDriver_initializeInternal_rdh | // ------------------------------------------------------------------------
// ResourceManagerDriver
// ------------------------------------------------------------------------
@Override protected void initializeInternal() throws Exception {
isRunning =
true;
final YarnContainerEventHandler yarnContainerEv... | 3.26 |
flink_YarnResourceManagerDriver_getYarnStatus_rdh | // ------------------------------------------------------------------------
// Utility methods
// ------------------------------------------------------------------------
/**
* Converts a Flink application status enum to a YARN application status enum.
*
* @param status
* The Flink application status.
* @return ... | 3.26 |
flink_YarnResourceManagerDriver_m0_rdh | // ------------------------------------------------------------------------
// Internal
// ------------------------------------------------------------------------
private void m0(Priority priority, List<Container> containers) {
final
Optional<TaskExecutorProcessSpecContainerResourcePr... | 3.26 |
flink_RecoverableMultiPartUploadImpl_snapshotAndGetRecoverable_rdh | /**
* Creates a snapshot of this MultiPartUpload, from which the upload can be resumed.
*
* <p>Data buffered locally which is less than {@link org.apache.flink.fs.s3.common.FlinkS3FileSystem#S3_MULTIPART_MIN_PART_SIZE
* S3_MULTIPART_MIN_PART_SIZE}, and cannot be uploaded as part of the MPU and set to S3 as
* indep... | 3.26 |
flink_RecoverableMultiPartUploadImpl_newUpload_rdh | // ------------------------------------------------------------------------
// factory methods
// ------------------------------------------------------------------------
public static RecoverableMultiPartUploadImpl newUpload(final S3AccessHelper s3AccessHelper, final Executor uploadThreadPool, final String objectName)... | 3.26 |
flink_RecoverableMultiPartUploadImpl_uploadPart_rdh | /**
* Adds a part to the uploads without any size limitations.
*
* <p>This method is non-blocking and does not wait for the part upload to complete.
*
* @param file
* The file with the part data.
* @throws IOException
* If this method throws an exception, the RecoverableS3MultiPartUpload
* should not be ... | 3.26 |
flink_FlinkVersion_rangeOf_rdh | /**
* Returns all versions within the defined range, inclusive both start and end.
*/
public static Set<FlinkVersion> rangeOf(FlinkVersion
start, FlinkVersion end) {
return
Stream.of(FlinkVersion.values()).filter(v -> (v.ordinal() >= start.ordinal()) && (v.ordinal() <= end.ordinal())).collect(Collectors.toCollection... | 3.26 |
flink_FlinkVersion_current_rdh | /**
* Returns the version for the current branch.
*/public static FlinkVersion current() {
return values()[values().length - 1];
} | 3.26 |
flink_VersionedIOReadableWritable_getCompatibleVersions_rdh | /**
* Returns the compatible version values.
*
* <p>By default, the base implementation recognizes only the current version (identified by
* {@link #getVersion()}) as compatible. This method can be used as a hook and may be overridden
* to identify more compatible versions.
*
* @return an array of integers repre... | 3.26 |
flink_BinaryArrayData_calculateFixLengthPartSize_rdh | /**
* It store real value when type is primitive. It store the length and offset of variable-length
* part when type is string, map, etc.
*/
public static int calculateFixLengthPartSize(LogicalType type) { // ordered by type root definition
switch (type.getTypeRoot()) {
case BOOLEAN :
case TINYI... | 3.26 |
flink_BinaryArrayData_fromPrimitiveArray_rdh | // ------------------------------------------------------------------------------------------
// Construction Utilities
// ------------------------------------------------------------------------------------------
public static BinaryArrayData fromPrimitiveArray(boolean[] arr) {
return
fromPrimitiveArray(arr, BOOLEAN_... | 3.26 |
flink_AbstractOrcColumnVector_createFlinkVectorFromConstant_rdh | /**
* Create flink vector by hive vector from constant.
*/
public static ColumnVector createFlinkVectorFromConstant(LogicalType type, Object value, int batchSize) {
return createFlinkVector(m0(type, value, batchSize), type);
} | 3.26 |
flink_AbstractOrcColumnVector_m0_rdh | /**
* Create a orc vector from partition spec value. See hive {@code VectorizedRowBatchCtx#addPartitionColsToBatch}.
*/
private static ColumnVector m0(LogicalType type, Object value, int batchSize) {
switch (type.getTypeRoot()) {
case CHAR :
case VARCHAR :
... | 3.26 |
flink_ContinuousEventTimeTrigger_of_rdh | /**
* Creates a trigger that continuously fires based on the given interval.
*
* @param interval
* The time interval at which to fire.
* @param <W>
* The type of {@link Window Windows} on which this trigger can operate.
*/
public static <W extends Window> ContinuousEventTimeTrigger<W> of(Time interval) {
... | 3.26 |
flink_CompactingHashTable_getMinPartition_rdh | /**
*
* @return number of memory segments in the smallest partition
*/
private int getMinPartition() {
int v69 = Integer.MAX_VALUE;
for (InMemoryPartition<T>
p1 : this.partitions) {
if (p1.getBlockCount() < v69) {
v69 = p1.getBlockCount();
}
}
return v69;
} | 3.26 |
flink_CompactingHashTable_close_rdh | /**
* Closes the hash table. This effectively releases all internal structures and closes all open
* files and removes them. The call to this method is valid both as a cleanup after the complete
* inputs were properly processed, and as an cancellation call, which cleans up all resources
* that are currently held by... | 3.26 |
flink_CompactingHashTable_getOverflowSegmentCount_rdh | /**
*
* @return number of memory segments used in overflow buckets
*/
private int getOverflowSegmentCount() {
int result = 0;
for (InMemoryPartition<T> p : this.partitions) {
result += p.numOverflowSegments;}
return result;
} | 3.26 |
flink_CompactingHashTable_fillCache_rdh | /**
* utility function that inserts all entries from a bucket and its overflow buckets into the
* cache
*
* @return true if last bucket was not reached yet
* @throws IOException
*/
private boolean fillCache() throws IOException {
if (currentBucketIndex >= table.numBuckets) {
return false;
}
Me... | 3.26 |
flink_CompactingHashTable_getInitialTableSize_rdh | /**
* tries to find a good value for the number of buckets will ensure that the number of buckets
* is a multiple of numPartitions
*
* @return number of buckets
*/ private static int getInitialTableSize(int numBuffers, int bufferSize, int numPartitions, int recordLenBytes) {
final long totalSize = ((long) (buf... | 3.26 |
flink_CompactingHashTable_m0_rdh | // --------------------------------------------------------------------------------------------
// Access to the entries
// --------------------------------------------------------------------------------------------
@Override
public <PT> HashTableProber<PT> m0(TypeComparator<PT> probeSideComparator, TypePairComparator... | 3.26 |
flink_CompactingHashTable_getEntryIterator_rdh | /**
*
* @return Iterator over hash table
* @see EntryIterator
*/
public MutableObjectIterator<T> getEntryIterator() {
return new EntryIterator(this);
} | 3.26 |
flink_CompactingHashTable_open_rdh | // ------------------------------------------------------------------------
// life cycle
// ------------------------------------------------------------------------
/**
* Initialize the hash table
*/
@Override
public void open() {
synchronized(stateLock) {
if (!closed) {
throw new IllegalStat... | 3.26 |
flink_CompactingHashTable_getMemoryConsumptionString_rdh | /**
*
* @return String containing a summary of the memory consumption for error messages
*/
private String getMemoryConsumptionString() {
return (((((((((((("numPartitions: " + this.partitions.size()) + " minPartition: ") + getMinPartition()) + " maxPartition: ") + getMaxPartition()) + " number of overflow segm... | 3.26 |
flink_CompactingHashTable_createPartitions_rdh | // --------------------------------------------------------------------------------------------
// Setup and Tear Down of Structures
// --------------------------------------------------------------------------------------------
private void createPartitions(int numPartitions) {
this.partitions.clear();
ListMem... | 3.26 |
flink_CompactingHashTable_resizeHashTable_rdh | /**
* Attempts to double the number of buckets
*
* @return true on success
* @throws IOException
*/
@VisibleForTesting
boolean resizeHashTable() throws IOException {
final int newNumBuckets = 2 * this.numBuckets;
final int bucketsPerSegment =
this.bucketsPerSegmentMask + 1;
final int newNumSegments = (newNumBucke... | 3.26 |
flink_CompactingHashTable_getSize_rdh | /**
* Size of all memory segments owned by this hash table
*
* @return size in bytes
*/
private long getSize() {
long numSegments = 0;
numSegments += this.availableMemory.size();
numSegments += this.buckets.length;
for (InMemoryPartition<T> p : this.partitions) {
numSegments +=
p.getBlockC... | 3.26 |
flink_CompactingHashTable_insertBucketEntryFromStart_rdh | /**
* IMPORTANT!!! We pass only the partition number, because we must make sure we get a fresh
* partition reference. The partition reference used during search for the key may have become
* invalid during the compaction.
*/
private void insertBucketEntryFromStart(MemorySegment bucket, int bucketInSegmentPos, int h... | 3.26 |
flink_CompactingHashTable_insertOrReplaceRecord_rdh | /**
* Replaces record in hash table if record already present or append record if not. May trigger
* expensive compaction.
*
* @param record
* record to insert or replace
* @throws IOException
*/
public void insertOrReplaceRecord(T record) throws IOException {
if (this.closed) {
return;
}
... | 3.26 |
flink_CompactingHashTable_getPartitionSize_rdh | /**
* Size of all memory segments owned by the partitions of this hash table excluding the
* compaction partition
*
* @return size in bytes
*/
private long getPartitionSize() {
long
numSegments = 0;
for (InMemoryPartition<T> p : this.partitions) {
numSegments += p.getBlockCount();
}
return numSegments * this.se... | 3.26 |
flink_CompactingHashTable_buildTableWithUniqueKey_rdh | // ------------------------------------------------------------------------
// adding data to the hash table
// ------------------------------------------------------------------------
public void buildTableWithUniqueKey(final MutableObjectIterator<T> input) throws IOException {
// go over the complete input and in... | 3.26 |
flink_CompactingHashTable_compactPartition_rdh | /**
* Compacts (garbage collects) partition with copy-compact strategy using compaction partition
*
* @param partitionNumber
* partition to compact
* @throws IOException
*/
private void compactPartition(final int partitionNumber) throws IOException {
// do nothing if table was closed, parameter is invalid or no... | 3.26 |
flink_CompactingHashTable_assignPartition_rdh | /**
* Assigns a partition to a bucket.
*
* @param bucket
* bucket index
* @param numPartitions
* number of partitions
* @return The hash code for the integer.
*/
private static byte assignPartition(int bucket, byte numPartitions) {
return ((byte) (bucket % numPartitions));
} | 3.26 |
flink_CompactingHashTable_getMaxPartition_rdh | /**
*
* @return number of memory segments in the largest partition
*/
private int getMaxPartition() {
int maxPartition = 0;
for (InMemoryPartition<T> p1 : this.partitions) {
if (p1.getBlockCount() > maxPartition) {
maxPartition = p1.getBlockCount();
}
}
return maxPartition;
} | 3.26 |
flink_TableMetaStoreFactory_finishWritingTable_rdh | /**
* After data has been inserted into table, some follow-up works related to metastore may
* need be done like report statistic to metastore.
*/
default void finishWritingTable(Path tablePath) throws
Exception {
} | 3.26 |
flink_MetricRegistryConfiguration_getScopeFormats_rdh | // ------------------------------------------------------------------------
// Getter
// ------------------------------------------------------------------------
public ScopeFormats getScopeFormats() {
return scopeFormats;
} | 3.26 |
flink_MetricRegistryConfiguration_fromConfiguration_rdh | // ------------------------------------------------------------------------
// Static factory methods
// ------------------------------------------------------------------------
/**
* Create a metric registry configuration object from the given {@link Configuration}.
*
* @param configuration
* to generate the met... | 3.26 |
flink_VertexInputInfoComputationUtils_m0_rdh | /**
* Compute the {@link JobVertexInputInfo} for a {@link DistributionPattern#POINTWISE} edge. This
* computation algorithm will evenly distribute subpartitions to downstream subtasks according
* to the number of subpartitions. Different downstream subtasks consume roughly the same number
* of subpartitions.
*
* ... | 3.26 |
flink_VertexInputInfoComputationUtils_computeVertexInputInfoForAllToAll_rdh | /**
* Compute the {@link JobVertexInputInfo} for a {@link DistributionPattern#ALL_TO_ALL} edge.
* This computation algorithm will evenly distribute subpartitions to downstream subtasks
* according to the number of subpartitions. Different downstream subtasks consume roughly the
* same number of subpartitions.
*
*... | 3.26 |
flink_VertexInputInfoComputationUtils_computeConsumedSubpartitionRange_rdh | /**
* Compute the consumed subpartition range for a subtask. This computation algorithm will evenly
* distribute subpartitions to downstream subtasks according to the number of subpartitions.
* Different downstream subtasks consume roughly the same number of subpartitions.
*
* @param consum... | 3.26 |
flink_StringUtf8Utils_encodeUTF8_rdh | /**
* This method must have the same result with JDK's String.getBytes.
*/
public static byte[] encodeUTF8(String str) {
byte[] bytes =
allocateReuseBytes(str.length() * MAX_BYTES_PER_CHAR);
int len = encodeUTF8(str, bytes);
return Arrays.copyOf(bytes, len);
} | 3.26 |
flink_HiveFunctionDefinitionFactory_createFunctionDefinitionFromHiveFunction_rdh | /**
* Create a FunctionDefinition from a Hive function's class name. Called directly by {@link org.apache.flink.table.module.hive.HiveModule}.
*/
public FunctionDefinition createFunctionDefinitionFromHiveFunction(String name, String functionClassName, Context context) {Class<?> functionClz;
try {
function... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.