Class BoundedBlockingResultPartition
java.lang.Object
org.apache.flink.runtime.io.network.partition.ResultPartition
org.apache.flink.runtime.io.network.partition.BufferWritingResultPartition
org.apache.flink.runtime.io.network.partition.BoundedBlockingResultPartition
- All Implemented Interfaces:
AutoCloseable,AvailabilityProvider,ResultPartitionWriter
A output data result of an individual task (one partition of an intermediate result), produced
and communicated in a batch manner: The result must be produced completely before it can be
consumed.
In this particular implementation, the batch result is written to (and read from) one file per sub-partition. This implementation hence requires at least as many files (file handles) and memory buffers as the parallelism of the target task that the data is shuffled to.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.runtime.io.AvailabilityProvider
AvailabilityProvider.AvailabilityHelper -
Field Summary
Fields inherited from class org.apache.flink.runtime.io.network.partition.BufferWritingResultPartition
subpartitionsFields inherited from class org.apache.flink.runtime.io.network.partition.ResultPartition
bufferCompressor, bufferPool, LOG, numBuffersOut, numBytesOut, numSubpartitions, partitionId, partitionManager, partitionType, resultPartitionBytesFields inherited from interface org.apache.flink.runtime.io.AvailabilityProvider
AVAILABLE -
Constructor Summary
ConstructorsConstructorDescriptionBoundedBlockingResultPartition(String owningTaskName, int partitionIndex, ResultPartitionID partitionId, ResultPartitionType partitionType, ResultSubpartition[] subpartitions, int numTargetKeyGroups, ResultPartitionManager partitionManager, BufferCompressor bufferCompressor, org.apache.flink.util.function.SupplierWithException<BufferPool, IOException> bufferPoolFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidflush(int targetSubpartition) Manually trigger the consumption of data from the given subpartitions.voidflushAll()Manually trigger the consumption of data from all subpartitions.voidnotifyEndOfData(StopMode mode) Notifies the downstream tasks that thisResultPartitionWriterhave emitted all the user records.Methods inherited from class org.apache.flink.runtime.io.network.partition.BufferWritingResultPartition
abortCheckpoint, addToSubpartition, alignedBarrierTimeout, broadcastEvent, broadcastRecord, close, createSubpartitionView, emitRecord, finish, flushAllSubpartitions, flushSubpartition, getAllPartitions, getHardBackPressuredTimeMsPerSecond, getNumberOfQueuedBuffers, getNumberOfQueuedBuffers, getSizeOfQueuedBuffersUnsafe, releaseInternal, setMetricGroup, setupInternalMethods inherited from class org.apache.flink.runtime.io.network.partition.ResultPartition
canBeCompressed, checkInProduceState, createSubpartitionView, fail, getAllDataProcessedFuture, getAvailableFuture, getBufferPool, getFailureCause, getNumberOfSubpartitions, getNumTargetKeyGroups, getOwningTaskName, getPartitionId, getPartitionIndex, getPartitionManager, getPartitionType, getResultPartitionBytes, isFinished, isNumberOfPartitionConsumerUndefined, isNumberOfPartitionConsumerUndefined, isReleased, onSubpartitionAllDataProcessed, release, release, setMaxOverdraftBuffersPerGate, setup, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.flink.runtime.io.AvailabilityProvider
isApproximatelyAvailable, isAvailable
-
Constructor Details
-
BoundedBlockingResultPartition
public BoundedBlockingResultPartition(String owningTaskName, int partitionIndex, ResultPartitionID partitionId, ResultPartitionType partitionType, ResultSubpartition[] subpartitions, int numTargetKeyGroups, ResultPartitionManager partitionManager, @Nullable BufferCompressor bufferCompressor, org.apache.flink.util.function.SupplierWithException<BufferPool, IOException> bufferPoolFactory)
-
-
Method Details
-
notifyEndOfData
Description copied from interface:ResultPartitionWriterNotifies the downstream tasks that thisResultPartitionWriterhave emitted all the user records.- Specified by:
notifyEndOfDatain interfaceResultPartitionWriter- Overrides:
notifyEndOfDatain classResultPartition- Parameters:
mode- tells if we should flush all records or not (it is false in case of stop-with-savepoint (--no-drain))- Throws:
IOException
-
flush
public void flush(int targetSubpartition) Description copied from interface:ResultPartitionWriterManually trigger the consumption of data from the given subpartitions. -
flushAll
public void flushAll()Description copied from interface:ResultPartitionWriterManually trigger the consumption of data from all subpartitions.
-