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, wait
createSortMergeReader
filter, forEachRemaining, forEachRemainingWithPosition, toCloseableIterator, transform
public 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>
IOException
public void close() throws IOException
RecordReader
close
in interface Closeable
close
in interface AutoCloseable
close
in interface RecordReader<T>
IOException
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.