public class PipelinedResultPartition extends BufferWritingResultPartition implements CheckpointedResultPartition, ChannelStateHolder
This result partition implementation is used both in batch and streaming. For streaming it supports low latency transfers (ensure data is sent within x milliseconds) or unconstrained while for batch it transfers only once a buffer is full. Additionally, for streaming use this typically limits the length of the buffer backlog to not have too much data in flight, while for batch we do not constrain this.
The PipelinedResultPartition cannot reconnect once a consumer disconnects (finished or
errored). Once all consumers have disconnected (released the subpartition, notified via the call
onConsumedSubpartition(int)) then the partition as a whole is disposed and all buffers
are freed.
AvailabilityProvider.AvailabilityHelpersubpartitionsbufferCompressor, bufferPool, LOG, numBuffersOut, numBytesOut, numSubpartitions, partitionId, partitionManager, partitionTypeAVAILABLE| Constructor and Description |
|---|
PipelinedResultPartition(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) |
| Modifier and Type | Method and Description |
|---|---|
void |
finishReadRecoveredState(boolean notifyAndBlockOnCompletion) |
void |
flush(int targetSubpartition)
Manually trigger the consumption of data from the given subpartitions.
|
void |
flushAll()
Manually trigger the consumption of data from all subpartitions.
|
CheckpointedResultSubpartition |
getCheckpointedSubpartition(int subpartitionIndex)
Gets the checkpointed subpartition with the given subpartitionIndex.
|
void |
setChannelStateWriter(ChannelStateWriter channelStateWriter)
Injects the
ChannelStateWriter. |
String |
toString() |
broadcastEvent, broadcastRecord, createSubpartitionView, emitRecord, finish, flushAllSubpartitions, flushSubpartition, getAllPartitions, getBackPressuredTimeMsPerSecond, getNumberOfQueuedBuffers, getNumberOfQueuedBuffers, releaseInternal, setMetricGroup, setupcanBeCompressed, checkInProduceState, close, fail, getAvailableFuture, getBufferPool, getFailureCause, getNumberOfSubpartitions, getNumTargetKeyGroups, getOwningTaskName, getPartitionId, getPartitionIndex, getPartitionManager, getPartitionType, isFinished, isReleased, release, releaseclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitand, isApproximatelyAvailable, isAvailable, orpublic PipelinedResultPartition(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)
public void setChannelStateWriter(ChannelStateWriter channelStateWriter)
ChannelStateHolderChannelStateWriter. Must only be called once.setChannelStateWriter in interface ChannelStateHolderpublic CheckpointedResultSubpartition getCheckpointedSubpartition(int subpartitionIndex)
CheckpointedResultPartitiongetCheckpointedSubpartition in interface CheckpointedResultPartitionpublic void flushAll()
ResultPartitionWriterflushAll in interface ResultPartitionWriterpublic void flush(int targetSubpartition)
ResultPartitionWriterflush in interface ResultPartitionWriterpublic String toString()
toString in class ResultPartitionpublic void finishReadRecoveredState(boolean notifyAndBlockOnCompletion)
throws IOException
finishReadRecoveredState in interface CheckpointedResultPartitionIOExceptionCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.