Class PipelinedSubpartition

java.lang.Object
org.apache.flink.runtime.io.network.partition.ResultSubpartition
org.apache.flink.runtime.io.network.partition.PipelinedSubpartition
All Implemented Interfaces:
ChannelStateHolder
Direct Known Subclasses:
PipelinedApproximateSubpartition

public class PipelinedSubpartition extends ResultSubpartition implements ChannelStateHolder
A pipelined in-memory only subpartition, which can be consumed once.

Whenever ResultSubpartition.add(BufferConsumer) adds a finished BufferConsumer or a second BufferConsumer (in which case we will assume the first one finished), we will notify a read view created via ResultSubpartition.createReadView(BufferAvailabilityListener) of new data availability. Except by calling flush() explicitly, we always only notify when the first finished buffer turns up and then, the reader has to drain the buffers via pollBuffer() until its return value shows no more buffers being available. This results in a buffer queue which is either empty or has an unfinished BufferConsumer left from which the notifications will eventually start again.

Explicit calls to flush() will force this notification for any BufferConsumer present in the queue.