Class BinaryKVInMemorySortBuffer
java.lang.Object
org.apache.flink.table.runtime.operators.sort.BinaryIndexedSortable
org.apache.flink.table.runtime.operators.sort.BinaryKVInMemorySortBuffer
- All Implemented Interfaces:
org.apache.flink.runtime.operators.sort.IndexedSortable
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
Modifier and TypeMethodDescriptionstatic BinaryKVInMemorySortBuffercreateBuffer(NormalizedKeyComputer normalizedKeyComputer, BinaryRowDataSerializer keySerializer, BinaryRowDataSerializer valueSerializer, RecordComparator comparator, ArrayList<org.apache.flink.core.memory.MemorySegment> recordBufferSegments, long numElements, MemorySegmentPool pool) final org.apache.flink.util.MutableObjectIterator<org.apache.flink.api.java.tuple.Tuple2<org.apache.flink.table.data.binary.BinaryRowData,org.apache.flink.table.data.binary.BinaryRowData>> Gets an iterator over all KV records in this buffer in their logical order.voidwriteToOutput(org.apache.flink.runtime.memory.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 Details
-
createBuffer
public static BinaryKVInMemorySortBuffer createBuffer(NormalizedKeyComputer normalizedKeyComputer, BinaryRowDataSerializer keySerializer, BinaryRowDataSerializer valueSerializer, RecordComparator comparator, ArrayList<org.apache.flink.core.memory.MemorySegment> recordBufferSegments, long numElements, MemorySegmentPool pool) throws IOException - Throws:
IOException
-
writeToOutput
public void writeToOutput(org.apache.flink.runtime.memory.AbstractPagedOutputView output) throws IOException Description copied from class:BinaryIndexedSortableSpill: Write all records to aAbstractPagedOutputView.- Overrides:
writeToOutputin classBinaryIndexedSortable- Throws:
IOException
-
getIterator
public final org.apache.flink.util.MutableObjectIterator<org.apache.flink.api.java.tuple.Tuple2<org.apache.flink.table.data.binary.BinaryRowData,org.apache.flink.table.data.binary.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.
-