Class BinaryKVInMemorySortBuffer
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.sort.BinaryIndexedSortable
-
- org.apache.flink.table.runtime.operators.sort.BinaryKVInMemorySortBuffer
-
- All Implemented Interfaces:
IndexedSortable
public class BinaryKVInMemorySortBuffer extends BinaryIndexedSortable
In memory KV sortable buffer for binary row, it already has records in memory.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.table.runtime.operators.sort.BinaryIndexedSortable
currentSortIndexOffset, currentSortIndexSegment, indexEntrySize, lastIndexEntryOffset, memorySegmentPool, numRecords, OFFSET_LEN, recordBuffer, row1, serializer, serializer1, sortIndex
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BinaryKVInMemorySortBuffer
createBuffer(NormalizedKeyComputer normalizedKeyComputer, BinaryRowDataSerializer keySerializer, BinaryRowDataSerializer valueSerializer, RecordComparator comparator, ArrayList<MemorySegment> recordBufferSegments, long numElements, MemorySegmentPool pool)
MutableObjectIterator<Tuple2<BinaryRowData,BinaryRowData>>
getIterator()
Gets an iterator over all KV records in this buffer in their logical order.void
writeToOutput(AbstractPagedOutputView output)
Spill: Write all records to aAbstractPagedOutputView
.-
Methods inherited from class org.apache.flink.table.runtime.operators.sort.BinaryIndexedSortable
checkNextIndexOffset, compare, compare, nextMemorySegment, recordSize, recordsPerSegment, size, swap, swap, writeIndexAndNormalizedKey
-
-
-
-
Method Detail
-
createBuffer
public static BinaryKVInMemorySortBuffer createBuffer(NormalizedKeyComputer normalizedKeyComputer, BinaryRowDataSerializer keySerializer, BinaryRowDataSerializer valueSerializer, RecordComparator comparator, ArrayList<MemorySegment> recordBufferSegments, long numElements, MemorySegmentPool pool) throws IOException
- Throws:
IOException
-
writeToOutput
public void writeToOutput(AbstractPagedOutputView output) throws IOException
Description copied from class:BinaryIndexedSortable
Spill: Write all records to aAbstractPagedOutputView
.- Overrides:
writeToOutput
in classBinaryIndexedSortable
- Throws:
IOException
-
getIterator
public final MutableObjectIterator<Tuple2<BinaryRowData,BinaryRowData>> getIterator()
Gets an iterator over all KV records in this buffer in their logical order.- Returns:
- An iterator returning the records in their logical order.
-
-