public abstract class BinaryIndexedSortable extends Object implements org.apache.flink.runtime.operators.sort.IndexedSortable
| Modifier and Type | Field and Description |
|---|---|
protected int |
currentSortIndexOffset |
protected org.apache.flink.core.memory.MemorySegment |
currentSortIndexSegment |
protected int |
indexEntrySize |
protected int |
lastIndexEntryOffset |
protected MemorySegmentPool |
memorySegmentPool |
protected int |
numRecords |
static int |
OFFSET_LEN |
protected org.apache.flink.runtime.io.disk.RandomAccessInputView |
recordBuffer |
protected org.apache.flink.table.data.binary.BinaryRowData |
row1 |
protected BinaryRowDataSerializer |
serializer |
protected BinaryRowDataSerializer |
serializer1 |
protected ArrayList<org.apache.flink.core.memory.MemorySegment> |
sortIndex |
| Constructor and Description |
|---|
BinaryIndexedSortable(NormalizedKeyComputer normalizedKeyComputer,
BinaryRowDataSerializer serializer,
RecordComparator comparator,
ArrayList<org.apache.flink.core.memory.MemorySegment> recordBufferSegments,
MemorySegmentPool memorySegmentPool) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkNextIndexOffset()
check if we need request next index memory.
|
int |
compare(int i,
int j) |
int |
compare(int segmentNumberI,
int segmentOffsetI,
int segmentNumberJ,
int segmentOffsetJ) |
protected org.apache.flink.core.memory.MemorySegment |
nextMemorySegment() |
int |
recordSize() |
int |
recordsPerSegment() |
int |
size() |
void |
swap(int i,
int j) |
void |
swap(int segmentNumberI,
int segmentOffsetI,
int segmentNumberJ,
int segmentOffsetJ) |
protected void |
writeIndexAndNormalizedKey(org.apache.flink.table.data.RowData record,
long currOffset)
Write of index and normalizedKey.
|
void |
writeToOutput(org.apache.flink.runtime.memory.AbstractPagedOutputView output)
Spill: Write all records to a
AbstractPagedOutputView. |
public static final int OFFSET_LEN
protected final BinaryRowDataSerializer serializer
protected final org.apache.flink.runtime.io.disk.RandomAccessInputView recordBuffer
protected org.apache.flink.core.memory.MemorySegment currentSortIndexSegment
protected final MemorySegmentPool memorySegmentPool
protected final ArrayList<org.apache.flink.core.memory.MemorySegment> sortIndex
protected final int indexEntrySize
protected final int lastIndexEntryOffset
protected final BinaryRowDataSerializer serializer1
protected final org.apache.flink.table.data.binary.BinaryRowData row1
protected int currentSortIndexOffset
protected int numRecords
public BinaryIndexedSortable(NormalizedKeyComputer normalizedKeyComputer, BinaryRowDataSerializer serializer, RecordComparator comparator, ArrayList<org.apache.flink.core.memory.MemorySegment> recordBufferSegments, MemorySegmentPool memorySegmentPool)
protected org.apache.flink.core.memory.MemorySegment nextMemorySegment()
protected boolean checkNextIndexOffset()
protected void writeIndexAndNormalizedKey(org.apache.flink.table.data.RowData record,
long currOffset)
public int compare(int i,
int j)
compare in interface org.apache.flink.runtime.operators.sort.IndexedSortablepublic int compare(int segmentNumberI,
int segmentOffsetI,
int segmentNumberJ,
int segmentOffsetJ)
compare in interface org.apache.flink.runtime.operators.sort.IndexedSortablepublic void swap(int i,
int j)
swap in interface org.apache.flink.runtime.operators.sort.IndexedSortablepublic void swap(int segmentNumberI,
int segmentOffsetI,
int segmentNumberJ,
int segmentOffsetJ)
swap in interface org.apache.flink.runtime.operators.sort.IndexedSortablepublic int size()
size in interface org.apache.flink.runtime.operators.sort.IndexedSortablepublic int recordSize()
recordSize in interface org.apache.flink.runtime.operators.sort.IndexedSortablepublic int recordsPerSegment()
recordsPerSegment in interface org.apache.flink.runtime.operators.sort.IndexedSortablepublic void writeToOutput(org.apache.flink.runtime.memory.AbstractPagedOutputView output)
throws IOException
AbstractPagedOutputView.IOExceptionCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.