public class BinaryExternalSortBuffer extends Object implements SortBuffer
SortBuffer.| Constructor and Description |
|---|
BinaryExternalSortBuffer(BinaryRowSerializer serializer,
RecordComparator comparator,
int pageSize,
BinaryInMemorySortBuffer inMemorySortBuffer,
IOManager ioManager,
int maxNumFileHandles,
CompressOptions compression,
MemorySize maxDiskSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
static BinaryExternalSortBuffer |
create(IOManager ioManager,
RowType rowType,
int[] keyFields,
long bufferSize,
int pageSize,
int maxNumFileHandles,
CompressOptions compression,
MemorySize maxDiskSize) |
static BinaryExternalSortBuffer |
create(IOManager ioManager,
RowType rowType,
int[] keyFields,
MemorySegmentPool pool,
int maxNumFileHandles,
CompressOptions compression,
MemorySize maxDiskSize) |
boolean |
flushMemory()
Flush memory, return false if not supported.
|
long |
getOccupancy() |
int |
size() |
MutableObjectIterator<BinaryRow> |
sortedIterator() |
boolean |
write(InternalRow record) |
void |
write(MutableObjectIterator<BinaryRow> iterator) |
public BinaryExternalSortBuffer(BinaryRowSerializer serializer, RecordComparator comparator, int pageSize, BinaryInMemorySortBuffer inMemorySortBuffer, IOManager ioManager, int maxNumFileHandles, CompressOptions compression, MemorySize maxDiskSize)
public static BinaryExternalSortBuffer create(IOManager ioManager, RowType rowType, int[] keyFields, long bufferSize, int pageSize, int maxNumFileHandles, CompressOptions compression, MemorySize maxDiskSize)
public static BinaryExternalSortBuffer create(IOManager ioManager, RowType rowType, int[] keyFields, MemorySegmentPool pool, int maxNumFileHandles, CompressOptions compression, MemorySize maxDiskSize)
public int size()
size in interface SortBufferpublic void clear()
clear in interface SortBufferpublic long getOccupancy()
getOccupancy in interface SortBufferpublic boolean flushMemory()
throws IOException
SortBufferflushMemory in interface SortBufferIOException@VisibleForTesting public void write(MutableObjectIterator<BinaryRow> iterator) throws IOException
IOExceptionpublic boolean write(InternalRow record) throws IOException
write in interface SortBufferIOExceptionpublic final MutableObjectIterator<BinaryRow> sortedIterator() throws IOException
sortedIterator in interface SortBufferIOExceptionCopyright © 2023–2024 The Apache Software Foundation. All rights reserved.