Class ProducerMergedPartitionFileWriter
- java.lang.Object
-
- org.apache.flink.runtime.io.network.partition.hybrid.tiered.file.ProducerMergedPartitionFileWriter
-
- All Implemented Interfaces:
PartitionFileWriter
public class ProducerMergedPartitionFileWriter extends Object implements PartitionFileWriter
The implementation ofPartitionFileWriterwith producer-side merge mode. In this mode, the shuffle data is written in the producer side, the consumer side need to read multiple producers to get its partition data.Note that one partition file written by the
ProducerMergedPartitionFileWritermay contain the data of multiple subpartitions.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.runtime.io.network.partition.hybrid.tiered.file.PartitionFileWriter
PartitionFileWriter.SegmentBufferContext, PartitionFileWriter.SubpartitionBufferContext
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrelease()Release all the resources of thePartitionFileWriter.CompletableFuture<Void>write(TieredStoragePartitionId partitionId, List<PartitionFileWriter.SubpartitionBufferContext> buffersToWrite)Write the buffers to the partition file.
-
-
-
Method Detail
-
write
public CompletableFuture<Void> write(TieredStoragePartitionId partitionId, List<PartitionFileWriter.SubpartitionBufferContext> buffersToWrite)
Description copied from interface:PartitionFileWriterWrite the buffers to the partition file. The written buffers may belong to multiple subpartitions, but these buffers will be consecutive in the file.- Specified by:
writein interfacePartitionFileWriter- Parameters:
partitionId- the partition idbuffersToWrite- the buffers to be written to the partition file- Returns:
- the completable future indicating whether the writing file process has finished. If
the
CompletableFutureis completed, the written process is completed.
-
release
public void release()
Description copied from interface:PartitionFileWriterRelease all the resources of thePartitionFileWriter.- Specified by:
releasein interfacePartitionFileWriter
-
-