Class SortBasedDataBuffer
java.lang.Object
org.apache.flink.runtime.io.network.partition.SortBuffer
org.apache.flink.runtime.io.network.partition.SortBasedDataBuffer
- All Implemented Interfaces:
DataBuffer
When getting buffers, The
SortBasedDataBuffer should recycle the read target buffer with
the given BufferRecycler.-
Field Summary
Fields inherited from class org.apache.flink.runtime.io.network.partition.SortBuffer
bufferRecycler, freeSegments, INDEX_ENTRY_SIZE, isFinished, isReleased, lastIndexEntryAddresses, numTotalBytesRead, readIndexEntryAddress, readOrderIndex, recordRemainingBytes, segments, subpartitionReadOrder -
Constructor Summary
ConstructorsConstructorDescriptionSortBasedDataBuffer(LinkedList<org.apache.flink.core.memory.MemorySegment> freeSegments, BufferRecycler bufferRecycler, int numSubpartitions, int bufferSize, int numGuaranteedBuffers, int[] customReadOrder) -
Method Summary
Modifier and TypeMethodDescriptiongetNextBuffer(org.apache.flink.core.memory.MemorySegment transitBuffer) Copies data in thisDataBufferto the targetMemorySegmentin subpartition index order and returnsBufferWithSubpartitionwhich contains the copied data and the corresponding subpartition index.Methods inherited from class org.apache.flink.runtime.io.network.partition.SortBuffer
append, copyRecordOrEvent, finish, getSegmentIndexFromPointer, getSegmentOffsetFromPointer, hasRemaining, isFinished, isReleased, numTotalBytes, numTotalRecords, release, updateReadSubpartitionAndIndexEntryAddress
-
Constructor Details
-
SortBasedDataBuffer
public SortBasedDataBuffer(LinkedList<org.apache.flink.core.memory.MemorySegment> freeSegments, BufferRecycler bufferRecycler, int numSubpartitions, int bufferSize, int numGuaranteedBuffers, @Nullable int[] customReadOrder)
-
-
Method Details
-
getNextBuffer
public BufferWithSubpartition getNextBuffer(org.apache.flink.core.memory.MemorySegment transitBuffer) Description copied from interface:DataBufferCopies data in thisDataBufferto the targetMemorySegmentin subpartition index order and returnsBufferWithSubpartitionwhich contains the copied data and the corresponding subpartition index.
-