Class ProducerMergedPartitionFileWriter
java.lang.Object
org.apache.flink.runtime.io.network.partition.hybrid.tiered.file.ProducerMergedPartitionFileWriter
- All Implemented Interfaces:
PartitionFileWriter
The implementation of
PartitionFileWriter with 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 ProducerMergedPartitionFileWriter may
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
Modifier and TypeMethodDescriptionvoidrelease()Release all the resources of thePartitionFileWriter.write(TieredStoragePartitionId partitionId, List<PartitionFileWriter.SubpartitionBufferContext> buffersToWrite) Write the buffers to the partition file.
-
Method Details
-
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
-