Class BinaryMergeIterator<Entry>
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.sort.BinaryMergeIterator<Entry>
-
- All Implemented Interfaces:
MutableObjectIterator<Entry>
public class BinaryMergeIterator<Entry> extends Object implements MutableObjectIterator<Entry>
Binary version ofMergeIterator
. UseRecordComparator
to compare record.
-
-
Constructor Summary
Constructors Constructor Description BinaryMergeIterator(List<MutableObjectIterator<Entry>> iterators, List<Entry> reusableEntries, Comparator<Entry> comparator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Entry
next()
Gets the next element from the collection.Entry
next(Entry reuse)
Gets the next element from the collection.
-
-
-
Constructor Detail
-
BinaryMergeIterator
public BinaryMergeIterator(List<MutableObjectIterator<Entry>> iterators, List<Entry> reusableEntries, Comparator<Entry> comparator) throws IOException
- Throws:
IOException
-
-
Method Detail
-
next
public Entry next(Entry reuse) throws IOException
Description copied from interface:MutableObjectIterator
Gets the next element from the collection. The contents of that next element is put into the given reuse object, if the type is mutable.- Specified by:
next
in interfaceMutableObjectIterator<Entry>
- Parameters:
reuse
- The target object into which to place next element if E is mutable.- Returns:
- The filled object or
null
if the iterator is exhausted. - Throws:
IOException
- Thrown, if a problem occurred in the underlying I/O layer or in the serialization / deserialization logic
-
next
public Entry next() throws IOException
Description copied from interface:MutableObjectIterator
Gets the next element from the collection. The iterator implementation must obtain a new instance.- Specified by:
next
in interfaceMutableObjectIterator<Entry>
- Returns:
- The object or
null
if the iterator is exhausted. - Throws:
IOException
- Thrown, if a problem occurred in the underlying I/O layer or in the serialization / deserialization logic
-
-