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 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(MutableObjectIterator<BinaryRow> iterator) throws IOException
IOException
public boolean write(InternalRow record) throws IOException
write
in interface SortBuffer
IOException
public final MutableObjectIterator<BinaryRow> sortedIterator() throws IOException
sortedIterator
in interface SortBuffer
IOException
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.