public interface ResultPartitionWriter
Modifier and Type | Method and Description |
---|---|
void |
addBufferConsumer(BufferConsumer bufferConsumer,
int subpartitionIndex)
Adds the bufferConsumer to the subpartition with the given index.
|
void |
flush(int subpartitionIndex)
Manually trigger consumption from enqueued
BufferConsumers in one specified subpartition. |
void |
flushAll()
Manually trigger consumption from enqueued
BufferConsumers in all subpartitions. |
BufferProvider |
getBufferProvider() |
int |
getNumberOfSubpartitions() |
int |
getNumTargetKeyGroups() |
ResultPartitionID |
getPartitionId() |
BufferProvider getBufferProvider()
ResultPartitionID getPartitionId()
int getNumberOfSubpartitions()
int getNumTargetKeyGroups()
void addBufferConsumer(BufferConsumer bufferConsumer, int subpartitionIndex) throws IOException
For PIPELINED ResultPartitionType
s,
this will trigger the deployment of consuming tasks after the first buffer has been added.
This method takes the ownership of the passed bufferConsumer
and thus is responsible for releasing
it's resources.
To avoid problems with data re-ordering, before adding new BufferConsumer
the previously added one
the given subpartitionIndex
must be marked as BufferConsumer.isFinished()
.
IOException
void flushAll()
BufferConsumers
in all subpartitions.void flush(int subpartitionIndex)
BufferConsumers
in one specified subpartition.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.