public class BinaryExternalSortBuffer extends Object implements SortBuffer
SortBuffer
.Constructor and Description |
---|
BinaryExternalSortBuffer(org.apache.flink.table.runtime.typeutils.BinaryRowDataSerializer serializer,
RecordComparator comparator,
int pageSize,
BinaryInMemorySortBuffer inMemorySortBuffer,
org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager,
int maxNumFileHandles) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
flushMemory()
Flush memory, return false if not supported.
|
long |
getOccupancy() |
int |
size() |
org.apache.flink.util.MutableObjectIterator<org.apache.flink.table.data.binary.BinaryRowData> |
sortedIterator() |
void |
write(org.apache.flink.util.MutableObjectIterator<org.apache.flink.table.data.binary.BinaryRowData> iterator) |
boolean |
write(org.apache.flink.table.data.RowData record) |
public BinaryExternalSortBuffer(org.apache.flink.table.runtime.typeutils.BinaryRowDataSerializer serializer, RecordComparator comparator, int pageSize, BinaryInMemorySortBuffer inMemorySortBuffer, org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager, int maxNumFileHandles)
public int size()
size
in interface SortBuffer
public void clear()
clear
in interface SortBuffer
public long getOccupancy()
getOccupancy
in interface SortBuffer
public boolean flushMemory() throws IOException
SortBuffer
flushMemory
in interface SortBuffer
IOException
@VisibleForTesting public void write(org.apache.flink.util.MutableObjectIterator<org.apache.flink.table.data.binary.BinaryRowData> iterator) throws IOException
IOException
public boolean write(org.apache.flink.table.data.RowData record) throws IOException
write
in interface SortBuffer
IOException
public final org.apache.flink.util.MutableObjectIterator<org.apache.flink.table.data.binary.BinaryRowData> sortedIterator() throws IOException
sortedIterator
in interface SortBuffer
IOException
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.