public class SortMergeReaderWithLoserTree<T> extends Object implements SortMergeReader<T>
SortMergeReader implemented with loser-tree.RecordReader.RecordIterator<T>| Constructor and Description |
|---|
SortMergeReaderWithLoserTree(List<RecordReader<KeyValue>> readers,
Comparator<InternalRow> userKeyComparator,
FieldsComparator userDefinedSeqComparator,
MergeFunctionWrapper<T> mergeFunctionWrapper) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the reader and should release all resources.
|
RecordReader.RecordIterator<T> |
readBatch()
Compared with heapsort,
LoserTree will only produce one batch. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateSortMergeReaderfilter, forEachRemaining, forEachRemainingWithPosition, toCloseableIterator, transformpublic SortMergeReaderWithLoserTree(List<RecordReader<KeyValue>> readers, Comparator<InternalRow> userKeyComparator, @Nullable FieldsComparator userDefinedSeqComparator, MergeFunctionWrapper<T> mergeFunctionWrapper)
@Nullable public RecordReader.RecordIterator<T> readBatch() throws IOException
LoserTree will only produce one batch.readBatch in interface RecordReader<T>IOExceptionpublic void close()
throws IOException
RecordReaderclose in interface Closeableclose in interface AutoCloseableclose in interface RecordReader<T>IOExceptionCopyright © 2023–2024 The Apache Software Foundation. All rights reserved.