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

@NotThreadSafe public class SortBasedDataBuffer extends SortBuffer
When getting buffers, The SortBasedDataBuffer should recycle the read target buffer with the given BufferRecycler.
  • 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: DataBuffer
      Copies data in this DataBuffer to the target MemorySegment in subpartition index order and returns BufferWithSubpartition which contains the copied data and the corresponding subpartition index.