name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_BinaryHashTable_endBuild_rdh
/** * End build phase. */ public void endBuild() throws IOException { // finalize the partitions int buildWriteBuffers = 0; for (BinaryHashPartition p : this.partitionsBeingBuilt) { buildWriteBuffers += p.finalizeBuildPhase(this.ioManager, this.currentEnumerator); } buildSpillRetBufferNu...
3.26
flink_BinaryHashTable_putBuildRow_rdh
// ========================== build phase public method ====================================== /** * Put a build side row to hash table. */ public void putBuildRow(RowData row) throws IOException { final int hashCode = hash(this.buildSideProjection.apply(row).hashCode(), 0); // TODO: combine key projection and bu...
3.26
flink_BinaryHashTable_clearPartitions_rdh
/** * This method clears all partitions currently residing (partially) in memory. It releases all * memory and deletes all spilled partitions. * * <p>This method is intended for a hard cleanup in the case that the join is aborted. */ @Override public void clearPartitions() { // clear the iterators, so the next...
3.26
flink_BinaryHashTable_spillPartition_rdh
/** * Selects a partition and spills it. The number of the spilled partition is returned. * * @return The number of the spilled partition. */ @Override protected int spillPartition() throws IOException { // find the largest partition int largestNumBlocks = 0; int...
3.26
flink_BinaryHashTable_nextMatching_rdh
// ========================== rebuild phase public method ====================================== /** * Next record from rebuilt spilled partition or build side outer partition. */ public boolean nextMatching() throws IOException { if (type.needSetProbed()) { return (processProbeIter() || m1())...
3.26
flink_NullValue_getBinaryLength_rdh
// -------------------------------------------------------------------------------------------- @Override public int getBinaryLength() { return 1; }
3.26
flink_NullValue_compareTo_rdh
// -------------------------------------------------------------------------------------------- @Override public int compareTo(NullValue o) { return 0; }
3.26
flink_NullValue_getMaxNormalizedKeyLen_rdh
// -------------------------------------------------------------------------------------------- @Override public int getMaxNormalizedKeyLen() { return 0; }
3.26
flink_NullValue_read_rdh
// -------------------------------------------------------------------------------------------- @Override public void read(DataInputView in) throws IOException {in.readBoolean(); }
3.26
flink_NullValue_toString_rdh
// -------------------------------------------------------------------------------------------- @Override public String toString() { return "(null)"; }
3.26
flink_NonReusingBuildSecondReOpenableHashJoinIterator_reopenProbe_rdh
/** * Set new input for probe side * * @throws java.io.IOException */ public void reopenProbe(MutableObjectIterator<V1> probeInput) throws IOException { reopenHashTable.reopenProbe(probeInput); }
3.26
flink_RestartAllFailoverStrategy_getTasksNeedingRestart_rdh
/** * Returns all vertices on any task failure. * * @param executionVertexId * ID of the failed task * @param cause * cause of the failure * @return set of IDs of vertices to restart */ @Override public Set<ExecutionVertexID> getTasksNeedingRestart(ExecutionVertexID executionVertexId, Throwable cause) { ...
3.26
flink_SourcePlanNode_setSerializer_rdh
/** * Sets the serializer for this PlanNode. * * @param serializer * The serializer to set. */ public void setSerializer(TypeSerializerFactory<?> serializer) { this.serializer = serializer; }
3.26
flink_SourcePlanNode_getDataSourceNode_rdh
// -------------------------------------------------------------------------------------------- public DataSourceNode getDataSourceNode() { return ((DataSourceNode) (this.template)); }
3.26
flink_SourcePlanNode_accept_rdh
// -------------------------------------------------------------------------------------------- @Override public void accept(Visitor<PlanNode> visitor) { if (visitor.preVisit(this)) { visitor.postVisit(this); }}
3.26
flink_PojoCsvInputFormat_findAllFields_rdh
/** * Finds all declared fields in a class and all its super classes. * * @param clazz * Class for which all declared fields are found * @param allFields * Map containing all found fields so far */ private void findAllFields(Class<?> clazz, Map<String, Field> allFields) { for (Field field : clazz.getDec...
3.26
flink_AbstractCollectResultBuffer_revert_rdh
/** * Revert the buffer back to the result whose offset is `checkpointedOffset`. */ protected void revert(long checkpointedOffset) { while (offset > checkpointedOffset) {buffer.removeLast();offset--; } }
3.26
flink_AbstractCollectResultBuffer_next_rdh
/** * Get next user visible result, returns null if currently there is no more. */ public T next() { if (userVisibleHead == userVisibleTail) { return null; } T ret = buffer.removeFirst(); userVisibleHead++; sanityCheck(); return ret; }
3.26
flink_AbstractCollectResultBuffer_m0_rdh
/** * Clear the whole buffer and discard all results. */ protected void m0() { buffer.clear(); userVisibleHead = 0; userVisibleTail = 0; offset = 0; }
3.26
flink_StandaloneResourceManagerFactory_getConfigurationWithoutResourceLimitationIfSet_rdh
/** * Get the configuration for standalone ResourceManager, overwrite invalid configs. * * @param configuration * configuration object * @return the configuration for standalone ResourceManager */ @VisibleForTesting public static Configuration getConfigurationWithoutResourceLimitationIfSet(Configuration config...
3.26
flink_TimeIntervalJoin_removeExpiredRows_rdh
/** * Remove the expired rows. Register a new timer if the cache still holds valid rows after the * cleaning up. * * @param collector * the collector to emit results * @param expirationTime * the expiration time f...
3.26
flink_TimeIntervalJoin_registerCleanUpTimer_rdh
/** * Register a timer for cleaning up rows in a specified time. * * @param ctx * the context to register timer * @param rowTime * time for the input row * @param leftRow * whether this row comes from the left stream */ private void registerCleanUpTimer(Context ctx, long rowTime, boolean leftRow) throws ...
3.26
flink_HadoopFileStatus_fromHadoopStatus_rdh
// ------------------------------------------------------------------------ /** * Creates a new {@code HadoopFileStatus} from Hadoop's {@link org.apache.hadoop.fs.FileStatus}. * If Hadoop's file status is <i>located</i>, i.e., it contains block information, then this * method returns an implementation of Flink's {@l...
3.26
flink_PythonStreamGroupTableAggregateOperator_getUserDefinedFunctionsProto_rdh
/** * Gets the proto representation of the Python user-defined table aggregate function to be * executed. */ @Overridepublic UserDefinedAggregateFunctions getUserDefinedFunctionsProto() { FlinkFnApi.UserDefinedAggregateFunctions.Builder builder = super.getUserDefinedFunctionsProto().toBuilder(); return buil...
3.26
flink_OSSTestCredentials_getOSSAccessKey_rdh
/** * Get OSS access key. * * @return OSS access key */ public static String getOSSAccessKey() { if (ACCESS_KEY != null) { return ACCESS_KEY; } else { throw new IllegalStateException("OSS access key is not available"); } }
3.26
flink_OSSTestCredentials_credentialsAvailable_rdh
// ------------------------------------------------------------------------ public static boolean credentialsAvailable() { return (((ENDPOINT != null) && (BUCKET != null)) && (ACCESS_KEY != null)) && (SECRET_KEY != null); }
3.26
flink_OSSTestCredentials_getOSSSecretKey_rdh
/** * Get OSS secret key. * * @return OSS secret key */ public static String getOSSSecretKey() { if (SECRET_KEY != null) { return SECRET_KEY; } else { throw new IllegalStateException("OSS secret key is not available"); } }
3.26
flink_BulkPartialSolutionNode_setCandidateProperties_rdh
// -------------------------------------------------------------------------------------------- public void setCandidateProperties(GlobalProperties gProps, LocalProperties lProps, Channel initialInput) { if (this.cachedPlans != null) { throw new IllegalStateException(); } else { this.cached...
3.26
flink_BulkPartialSolutionNode_getOperator_rdh
// -------------------------------------------------------------------------------------------- /** * Gets the operator (here the {@link PartialSolutionPlaceHolder}) that is represented by this * optimizer node. * * @return The operator represented by this optimizer node. */ @Override public PartialSolutionPlaceHo...
3.26
flink_AvroSchemaConverter_m0_rdh
/** * Converts Flink SQL {@link LogicalType} (can be nested) into an Avro schema. * * <p>The "{rowName}_" is used as the nested row type name prefix in order to generate the right * schema. Nested record type that only differs with type name is still compatible. * * @param logicalType * logical type * @param ...
3.26
flink_AvroSchemaConverter_convertToDataType_rdh
/** * Converts an Avro schema string into a nested row structure with deterministic field order and * data types that are compatible with Flink's Table & SQL API. * * @param avroSchemaString * Avro schema definition string * @return data type matching the schema */ public static DataType convertToDataType(Stri...
3.26
flink_AvroSchemaConverter_convertToTypeInfo_rdh
/** * Converts an Avro schema string into a nested row structure with deterministic field order and * data types that are compatible with Flink's Table & SQL API. * * @param avroSchemaString * Avro schema definition string * @return type information matching the schema */ @S...
3.26
flink_StreamExchangeModeUtils_getGlobalStreamExchangeMode_rdh
/** * The {@link GlobalStreamExchangeMode} should be determined by the {@link StreamGraphGenerator} * in the future. */ @Deprecated static Optional<GlobalStreamExchangeMode> getGlobalStreamExchangeMode(ReadableConfig config) { return config.getOptional(ExecutionConfigOptions.TABLE_EXEC_SHUFFLE_MODE).map(value ->...
3.26
flink_LocationPreferenceSlotSelectionStrategy_createDefault_rdh
// ------------------------------------------------------------------------------------------- // Factory methods // ------------------------------------------------------------------------------------------- public static LocationPreferenceSlotSelectionStrategy createDefault() {return new DefaultLocationPreferenceSlot...
3.26
flink_Time_hours_rdh
/** * Creates a new {@link Time} that represents the given number of hours. */ public static Time hours(long hours) {return of(hours, TimeUnit.HOURS); }
3.26
flink_Time_seconds_rdh
/** * Creates a new {@link Time} that represents the given number of seconds. */ public static Time seconds(long seconds) { return of(seconds, TimeUnit.SECONDS); }
3.26
flink_Time_days_rdh
/** * Creates a new {@link Time} that represents the given number of days. */ public static Time days(long days) { return of(days, TimeUnit.DAYS); }
3.26
flink_Time_milliseconds_rdh
/** * Creates a new {@link Time} that represents the given number of milliseconds. */ public static Time milliseconds(long milliseconds) { return of(milliseconds, TimeUnit.MILLISECONDS);}
3.26
flink_Time_of_rdh
// ------------------------------------------------------------------------ // Factory // ------------------------------------------------------------------------ /** * Creates a new {@link Time} of the given duration and {@link TimeUnit}. * * <p>The {@code Time} refers to the time characteristic that is set on the ...
3.26
flink_Time_minutes_rdh
/** * Creates a new {@link Time} that represents the given number of minutes. */ public static Time minutes(long minutes) { return of(minutes, TimeUnit.MINUTES); }
3.26
flink_TableResultImpl_m0_rdh
/** * Specifies print style. Default is {@link TableauStyle} with max integer column width. */ public Builder m0(PrintStyle printStyle) { Preconditions.checkNotNull(printStyle, "printStyle should not be null"); this.printStyle = printStyle; return this; }
3.26
flink_TableResultImpl_resultKind_rdh
/** * Specifies result kind of the execution result. * * @param resultKind * a {@link ResultKind} for the execution result. */ public Builder resultKind(ResultKind resultKind) { Preconditions.checkNotNull(resultKind, "resultKind should not be null"); this.resultKind = resultKind; return this; }
3.26
flink_TableResultImpl_jobClient_rdh
/** * Specifies job client which associates the submitted Flink job. * * @param jobClient * a {@link JobClient} for the submitted Flink job. */ public Builder jobClient(JobClient jobClient) { this.jobClient = jobClient; return this; }
3.26
flink_TableResultImpl_data_rdh
/** * Specifies an row list as the execution result. * * @param rowList * a row list as the execution result. */ public Builder data(List<Row> rowList) { Preconditions.checkNotNull(rowList, "listRows should not be null"); this.resultProvider = new StaticResultProvider(rowList); return this; }
3.26
flink_TableResultImpl_build_rdh
/** * Returns a {@link TableResult} instance. */ public TableResultInternal build() { if (printStyle == null) { printStyle = PrintStyle.rawContent(resultProvider.getRowDataStringConverter()); }return new TableResultImpl(jobClient, resolvedSchema, resultKind, resultProvider, printStyle); }
3.26
flink_TableResultImpl_schema_rdh
/** * Specifies schema of the execution result. * * @param resolvedSchema * a {@link ResolvedSchema} for the execution result. */ public Builder schema(ResolvedSchema resolvedSchema) { Preconditions.checkNotNull(resolvedSchema, "resolvedSchema should not be null"); this.resolvedSchema = resolvedSchema; ...
3.26
flink_TwoInputUdfOperator_setSemanticProperties_rdh
/** * Sets the semantic properties for the user-defined function (UDF). The semantic properties * define how fields of tuples and other objects are modified or preserved through this UDF. The * configured properties can be retrieved via {@link UdfOperator#getSemanticProperties()}. * * @param properties * The se...
3.26
flink_TwoInputUdfOperator_withParameters_rdh
// -------------------------------------------------------------------------------------------- // Fluent API methods // -------------------------------------------------------------------------------------------- @Override public O withParameters(Configuration parameters) { this.parameters = parameters; @Sup...
3.26
flink_TwoInputUdfOperator_returns_rdh
/** * Adds a type information hint about the return type of this operator. This method can be used * in cases where Flink cannot determine automatically what the produced type of a function is. * That can be the case if the function uses generic type variables in the return type that * cannot be inferred from the i...
3.26
flink_TwoInputUdfOperator_withForwardedFieldsFirst_rdh
/** * Adds semantic information about forwarded fields of the first input of the user-defined * function. The forwarded fields information declares fields which are never modified by the * function and which are forwarded at the same position to the output or unchanged copied to * another position in the output. *...
3.26
flink_TwoInputUdfOperator_getBroadcastSets_rdh
// -------------------------------------------------------------------------------------------- // Accessors // -------------------------------------------------------------------------------------------- @Override @Internal public Map<String, DataSet<?>> getBroadcastSets() { return this.broadcastVariables == null ? Co...
3.26
flink_TwoInputUdfOperator_withForwardedFieldsSecond_rdh
/** * Adds semantic information about forwarded fields of the second input of the user-defined * function. The forwarded fields information declares fields which are never modified by the * function and which are forwarded at the same position to the output or unchanged copied to * another position in the output. ...
3.26
flink_PojoSerializerSnapshot_getCompatibilityOfPreExistingFields_rdh
/** * Finds which Pojo fields exists both in the new {@link PojoSerializer} as well as in the * previous one (represented by this snapshot), and returns an {@link IntermediateCompatibilityResult} of the serializers of those preexisting fields. */ private static <T> IntermediateCompatibilityResult<T> getCompatibility...
3.26
flink_PojoSerializerSnapshot_decomposeSubclassSerializerRegistry_rdh
/** * Transforms the subclass serializer registry structure, {@code LinkedHashMap<Class<?>, * TypeSerializer<?>>} to 2 separate structures: a map containing with registered classes as key * and their corresponding ids (order in the original map) as value, as well as a separate array * of the corresponding subclass ...
3.26
flink_PojoSerializerSnapshot_previousSerializerHasNonRegisteredSubclasses_rdh
/** * Checks whether the previous serializer, represented by this snapshot, has non-registered * subclasses. */ private static boolean previousSerializerHasNonRegisteredSubclasses(LinkedOptionalMap<Class<?>, TypeSerializerSnapshot<?>> nonRegisteredSubclassSerializerSnapshots) { return nonRegisteredSubclassSerial...
3.26
flink_PojoSerializerSnapshot_m2_rdh
/** * Checks whether the new {@link PojoSerializer} has a different subclass registration order * compared to the previous one. */ private static boolean m2(LinkedOptionalMap<Class<?>, TypeSerializerSnapshot<?>> registeredSubclassSerializerSnapshots, PojoSerializer<?> newPojoSerializer) { Set<Class<?>> previous...
3.26
flink_PojoSerializerSnapshot_getCompatibilityOfPreExistingRegisteredSubclasses_rdh
/** * Finds which registered subclasses exists both in the new {@link PojoSerializer} as well as in * the previous one (represented by this snapshot), and returns an {@link IntermediateCompatibilityResult} of the serializers of this preexisting registered * subclasses. */ private static <T> IntermediateCompatibilit...
3.26
flink_PojoSerializerSnapshot_newPojoSerializerIsCompatibleWithReconfiguredSerializer_rdh
/** * Checks if the new {@link PojoSerializer} is compatible with a reconfigured instance. */ private static <T> boolean newPojoSerializerIsCompatibleWithReconfiguredSerializer(PojoSerializer<T> newPojoSerializer, IntermediateCompatibilityResult<T> fieldSerializerCompatibility, IntermediateCompatibilityResult<T> preE...
3.26
flink_PojoSerializerSnapshot_newPojoHasNewOrRemovedFields_rdh
/** * Checks whether the new {@link PojoSerializer} has new or removed fields compared to the * previous one. */ private static boolean newPojoHasNewOrRemovedFields(LinkedOptionalMap<Field, TypeSerializerSnapshot<?>> fieldSerializerSnapshots, PojoSerializer<?> newPojoSerializer) { int numRemovedFields = fieldS...
3.26
flink_PojoSerializerSnapshot_m1_rdh
// --------------------------------------------------------------------------------------------- // Utility methods // --------------------------------------------------------------------------------------------- /** * Transforms a {@link LinkedHashMap} with {@link TypeSerializerSnapshot}s as the value to * {@link Ty...
3.26
flink_PojoSerializerSnapshot_newPojoSerializerIsCompatibleAfterMigration_rdh
/** * Checks if the new {@link PojoSerializer} is compatible after migration. */ private static <T> boolean newPojoSerializerIsCompatibleAfterMigration(PojoSerializer<T> newPojoSerializer, IntermediateCompatibilityResult<T> fieldSerializerCompatibility, IntermediateCompatibilityResult<T> preExistingRegistrationsCompa...
3.26
flink_PojoSerializerSnapshot_buildNewFieldSerializersIndex_rdh
/** * Builds an index of fields to their corresponding serializers for the new {@link PojoSerializer} for faster field serializer lookups. */private static <T> Map<Field, TypeSerializer<?>> buildNewFieldSerializersIndex(PojoSerializer<T> newPojoSerializer) {final Field[] newFields = newPojoSerializer.getFields(); ...
3.26
flink_TemporalRowTimeJoinOperator_cleanupExpiredVersionInState_rdh
/** * Removes all expired version in the versioned table's state according to current watermark. */ private void cleanupExpiredVersionInState(long currentWatermark, List<RowData> rightRowsSorted) throws Exception { int v14 = 0; int indexToKeep = firstIndexToKeep(currentWatermark, rightRowsSorted); // clean old versio...
3.26
flink_TemporalRowTimeJoinOperator_cleanupState_rdh
/** * The method to be called when a cleanup timer fires. * * @param time * The timestamp of the fired timer. */ @Override public void cleanupState(long time) { leftState.clear(); rightState.clear(); nextLeftIndex.clear(); registeredTimer.clear(); }
3.26
flink_TemporalRowTimeJoinOperator_latestRightRowToJoin_rdh
/** * Binary search {@code rightRowsSorted} to find the latest right row to join with {@code leftTime}. Latest means a right row with largest time that is still smaller or equal to * {@code leftTime}. For example with: rightState = [1(+I), 4(+U), 7(+U), 9(-D), 12(I)], * * <p>If left time is 6, the valid period shou...
3.26
flink_Rowtime_timestampsFromExtractor_rdh
/** * Sets a custom timestamp extractor to be used for the rowtime attribute. * * @param extractor * The {@link TimestampExtractor} to extract the rowtime attribute from the * physical type. */ public Rowtime timestampsFromExtractor(TimestampExtractor extractor) { internalProperties.putProperties(extracto...
3.26
flink_Rowtime_m0_rdh
/** * Sets a custom watermark strategy to be used for the rowtime attribute. */ public Rowtime m0(WatermarkStrategy strategy) { internalProperties.putProperties(strategy.toProperties()); return this; }
3.26
flink_Rowtime_timestampsFromSource_rdh
/** * Sets a built-in timestamp extractor that converts the assigned timestamps from a DataStream * API record into the rowtime attribute and thus preserves the assigned timestamps from the * source. * * <p>Note: This extractor only works in streaming environments. */ public Rowtime timestampsFromSource() { ...
3.26
flink_Rowtime_timestampsFromField_rdh
/** * Sets a built-in timestamp extractor that converts an existing {@link Long} or {@link Types#SQL_TIMESTAMP} field into the rowtime attribute. * * @param fieldName * The field to convert into a rowtime attribute. */ public Rowtime timestampsFromField(String fieldName) { intern...
3.26
flink_Rowtime_watermarksPeriodicBounded_rdh
/** * Sets a built-in watermark strategy for rowtime attributes which are out-of-order by a bounded * time interval. * * <p>Emits watermarks which are the maximum observed timestamp minus the specified delay. * * @param delay * delay in milliseconds */ public Rowtime watermarksPeriodicBounded(long delay) { ...
3.26
flink_Rowtime_watermarksPeriodicAscending_rdh
/** * Sets a built-in watermark strategy for ascending rowtime attributes. * * <p>Emits a watermark of the maximum observed timestamp so far minus 1. Rows that have a * timestamp equal to the max timestamp are not late. */ public Rowtime watermarksPeriodicAscending() { internalProperties.putString(ROWTIME_WATE...
3.26
flink_Rowtime_toProperties_rdh
/** * Converts this descriptor into a set of properties. */ @Override public Map<String, String> toProperties() { final DescriptorProperties properties = new DescriptorProperties(); properties.putProperties(internalProperties); return properties.asMap();}
3.26
flink_Rowtime_watermarksFromSource_rdh
/** * Sets a built-in watermark strategy which indicates the watermarks should be preserved from * the underlying DataStream API and thus preserves the assigned watermarks from the source. */ public Rowtime watermarksFromSource() { internalProperties.putString(ROWTIME_WATERMARKS_TYPE, ROWTIME_WATERMARKS_TYPE_VALUE_F...
3.26
flink_FileExecutionGraphInfoStore_calculateSize_rdh
// -------------------------------------------------------------- // Internal methods // -------------------------------------------------------------- private int calculateSize(JobID jobId, ExecutionGraphInfo serializableExecutionGraphInfo) {final File executionGraphInfoFile = getExecutionGraphFile(jobId); if (executi...
3.26
flink_FileExecutionGraphInfoStore_getStorageDir_rdh
// Testing methods // -------------------------------------------------------------- @VisibleForTesting File getStorageDir() { return storageDir; }
3.26
flink_ChangelogMode_insertOnly_rdh
/** * Shortcut for a simple {@link RowKind#INSERT}-only changelog. */ public static ChangelogMode insertOnly() {return INSERT_ONLY; }
3.26
flink_ChangelogMode_newBuilder_rdh
/** * Builder for configuring and creating instances of {@link ChangelogMode}. */ public static Builder newBuilder() { return new Builder(); }
3.26
flink_ChangelogMode_all_rdh
/** * Shortcut for a changelog that can contain all {@link RowKind}s. */ public static ChangelogMode all() { return ALL;}
3.26
flink_AccumulatorSnapshot_deserializeUserAccumulators_rdh
/** * Gets the user-defined accumulators values. * * @return the serialized map */ public Map<String, Accumulator<?, ?>> deserializeUserAccumulators(ClassLoader classLoader) throws IOException, ClassNotFoundException { return userAccumulators.deserializeValue(classLoader); }
3.26
flink_KeyedBroadcastProcessFunction_onTimer_rdh
/** * Called when a timer set using {@link TimerService} fires. * * @param timestamp * The timestamp of the firing timer. * @param ctx * An {@link OnTimerContext} that allows querying the timestamp of the firing timer, * querying the current processing/event time, iterating the broadcast state with * <b...
3.26
flink_ResolvedCatalogTable_getOptions_rdh
// -------------------------------------------------------------------------------------------- // Delegations to original CatalogTable // -------------------------------------------------------------------------------------------- @Override public Map<String, String> getOptions() { return origin.getOptions(); }
3.26
flink_PipelinedApproximateSubpartition_createReadView_rdh
/** * To simply the view releasing threading model, {@link PipelinedApproximateSubpartition#releaseView()} is called only before creating a new view. * * <p>There is still one corner case when a downstream task fails continuously in a short period * of time then multiple netty worker threads can createReadView at t...
3.26
flink_PipelinedApproximateSubpartition_setIsPartialBufferCleanupRequired_rdh
/** * for testing only. */ @VisibleForTesting void setIsPartialBufferCleanupRequired() { isPartialBufferCleanupRequired = true; }
3.26
flink_ManagedInitializationContext_isRestored_rdh
/** * Returns true, if state was restored from the snapshot of a previous execution. */ default boolean isRestored() { return getRestoredCheckpointId().isPresent(); }
3.26
flink_HsFileDataManager_run_rdh
// Note, this method is synchronized on `this`, not `lock`. The purpose here is to prevent // concurrent `run()` executions. Concurrent calls to other methods are allowed. @Override public synchronized void run() { int numBuffersRead = tryRead();endCurrentRoundOfReading(numBuffersRead);}
3.26
flink_HsFileDataManager_release_rdh
/** * Releases this file data manager and delete shuffle data after all readers is removed. */ public void release() { synchronized(lock) { if (isReleased) { return;} isReleased = true; List<HsSubpartitionFileReader> pendingReaders = new ArrayList<>(allReaders); mayNoti...
3.26
flink_HsFileDataManager_tryRead_rdh
// ------------------------------------------------------------------------ // Internal Methods // ------------------------------------------------------------------------ /** * * @return number of buffers read. */ private int tryRead() { Queue<HsSubpartitionFileReader> ...
3.26
flink_HsFileDataManager_recycle_rdh
// ------------------------------------------------------------------------ // Implementation Methods of BufferRecycler // ------------------------------------------------------------------------ @Override public void recycle(MemorySegment segment) { synchronized(lock) { bufferPool.recycle(segment); --numReques...
3.26
flink_HsFileDataManager_setup_rdh
/** * Setup read buffer pool. */ public void setup() { bufferPool.initialize(); }
3.26
flink_HsFileDataManager_releaseSubpartitionReader_rdh
/** * Release specific {@link HsSubpartitionFileReader} from {@link HsFileDataManager}. * * @param subpartitionFileReader * to release. */ public void releaseSubpartitionReader(HsSubpartitionFileReader subpartitionFileReader) { synchronized(lock) { removeSubpartitionReaders(Collections.singleton(subp...
3.26
flink_HsFileDataManager_m0_rdh
/** * This method only called by result partition to create subpartitionFileReader. */ public HsDataView m0(int subpartitionId, HsConsumerId consumerId, HsSubpartitionConsumerInternalOperations operation) throws IOException { synchronized(lock) { checkState(!isReleased, "HsFileDataManager is already rel...
3.26
flink_ReduceOperatorBase_setCustomPartitioner_rdh
// -------------------------------------------------------------------------------------------- public void setCustomPartitioner(Partitioner<?> customPartitioner) { if (customPartitioner != null) { int[] keys = getKeyColumns(0); if ((keys == null) || (keys.length == 0))...
3.26
flink_ReduceOperatorBase_executeOnCollections_rdh
// -------------------------------------------------------------------------------------------- @Override protected List<T> executeOnCollections(List<T> inputData, RuntimeContext ctx, ExecutionConfig executionConfig) throws Exception { // make sure we can handle empty inputs if (inputData.isEmpty()) { return Colle...
3.26
flink_BoundedBlockingSubpartition_createWithMemoryMappedFile_rdh
/** * Creates a BoundedBlockingSubpartition that stores the partition data in memory mapped file. * Data is written to and read from the mapped memory region. Disk spilling happens lazily, when * the OS swaps out the pages from the memory mapped file. */ public static BoundedBlockingSubpartition createWithMemoryMap...
3.26
flink_BoundedBlockingSubpartition_unsynchronizedGetNumberOfQueuedBuffers_rdh
// ---------------------------- statistics -------------------------------- @Override public int unsynchronizedGetNumberOfQueuedBuffers() { return 0; }
3.26
flink_BoundedBlockingSubpartition_isFinished_rdh
// ------------------------------------------------------------------------ /** * Checks if writing is finished. Readers cannot be created until writing is finished, and no * further writes can happen after that. */ public boolean isFinished() { return isFinished; }
3.26
flink_BoundedBlockingSubpartition_createWithFileChannel_rdh
// ---------------------------- factories -------------------------------- /** * Creates a BoundedBlockingSubpartition that simply stores the partition data in a file. Data * is eagerly spilled (written to disk) and readers directly read from the file. */ public static BoundedBlockingSubpartition createWithFileChann...
3.26
flink_BoundedBlockingSubpartition_createWithFileAndMemoryMappedReader_rdh
/** * Creates a BoundedBlockingSubpartition that stores the partition data in a file and memory * maps that file for reading. Data is eagerly spilled (written to disk) and then mapped into * memory. The main difference to the {@link #createWithMemoryMappedFile(int, ResultPartition, * File)} variant is that no I/O i...
3.26
flink_ExecEdge_translateToFusionCodegenSpec_rdh
/** * Translates this edge into operator fusion codegen spec generator. * * @param planner * The {@link Planner} of the translated Table. */ public OpFusionCodegenSpecGenerator translateToFusionCodegenSpec(Planner planner) { return source.translateToFusionCodegenSpec(planner); }
3.26
flink_ExecEdge_getOutputType_rdh
/** * Returns the output {@link LogicalType} of the data passing this edge. */ public LogicalType getOutputType() { return source.getOutputType(); }
3.26