Interface PartitionFileWriter
- All Known Implementing Classes:
ProducerMergedPartitionFileWriter,SegmentPartitionFileWriter
public interface PartitionFileWriter
The
PartitionFileWriter interface defines the write logic for different types of shuffle
files.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classThePartitionFileWriter.SegmentBufferContextcontains all the buffers belonging to the segment.static classThePartitionFileWriter.SubpartitionBufferContextcontains all the buffers belonging to one subpartition. -
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
CompletableFuture<Void> write(TieredStoragePartitionId partitionId, List<PartitionFileWriter.SubpartitionBufferContext> buffersToWrite) Write the buffers to the partition file. The written buffers may belong to multiple subpartitions, but these buffers will be consecutive in the file.- 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
void release()Release all the resources of thePartitionFileWriter.
-