public abstract class BinaryIndexedSortable extends Object implements org.apache.flink.runtime.operators.sort.IndexedSortable
| 限定符和类型 | 字段和说明 |
|---|---|
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 BinaryRow |
row1 |
protected BinaryRowSerializer |
serializer |
protected BinaryRowSerializer |
serializer1 |
protected ArrayList<org.apache.flink.core.memory.MemorySegment> |
sortIndex |
| 构造器和说明 |
|---|
BinaryIndexedSortable(NormalizedKeyComputer normalizedKeyComputer,
BinaryRowSerializer serializer,
RecordComparator comparator,
ArrayList<org.apache.flink.core.memory.MemorySegment> recordBufferSegments,
MemorySegmentPool memorySegmentPool) |
| 限定符和类型 | 方法和说明 |
|---|---|
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(BaseRow 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 BinaryRowSerializer 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 BinaryRowSerializer serializer1
protected final BinaryRow row1
protected int currentSortIndexOffset
protected int numRecords
public BinaryIndexedSortable(NormalizedKeyComputer normalizedKeyComputer, BinaryRowSerializer serializer, RecordComparator comparator, ArrayList<org.apache.flink.core.memory.MemorySegment> recordBufferSegments, MemorySegmentPool memorySegmentPool) throws IOException
IOExceptionprotected org.apache.flink.core.memory.MemorySegment nextMemorySegment()
protected boolean checkNextIndexOffset()
protected void writeIndexAndNormalizedKey(BaseRow record, long currOffset)
public int compare(int i,
int j)
compare 在接口中 org.apache.flink.runtime.operators.sort.IndexedSortablepublic int compare(int segmentNumberI,
int segmentOffsetI,
int segmentNumberJ,
int segmentOffsetJ)
compare 在接口中 org.apache.flink.runtime.operators.sort.IndexedSortablepublic void swap(int i,
int j)
swap 在接口中 org.apache.flink.runtime.operators.sort.IndexedSortablepublic void swap(int segmentNumberI,
int segmentOffsetI,
int segmentNumberJ,
int segmentOffsetJ)
swap 在接口中 org.apache.flink.runtime.operators.sort.IndexedSortablepublic int size()
size 在接口中 org.apache.flink.runtime.operators.sort.IndexedSortablepublic int recordSize()
recordSize 在接口中 org.apache.flink.runtime.operators.sort.IndexedSortablepublic int recordsPerSegment()
recordsPerSegment 在接口中 org.apache.flink.runtime.operators.sort.IndexedSortablepublic void writeToOutput(org.apache.flink.runtime.memory.AbstractPagedOutputView output)
throws IOException
AbstractPagedOutputView.IOExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.