Class ReusingSortMergeCoGroupIterator<T1,T2>
- java.lang.Object
-
- org.apache.flink.runtime.operators.sort.ReusingSortMergeCoGroupIterator<T1,T2>
-
- All Implemented Interfaces:
CoGroupTaskIterator<T1,T2>
public class ReusingSortMergeCoGroupIterator<T1,T2> extends Object implements CoGroupTaskIterator<T1,T2>
-
-
Constructor Summary
Constructors Constructor Description ReusingSortMergeCoGroupIterator(MutableObjectIterator<T1> input1, MutableObjectIterator<T2> input2, TypeSerializer<T1> serializer1, TypeComparator<T1> groupingComparator1, TypeSerializer<T2> serializer2, TypeComparator<T2> groupingComparator2, TypePairComparator<T1,T2> pairComparator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
General-purpose close method.Iterable<T1>
getValues1()
Returns an iterable over the left input values for the current key.Iterable<T2>
getValues2()
Returns an iterable over the left input values for the current key.boolean
next()
Moves the internal pointer to the next key (if present).void
open()
General-purpose open method.
-
-
-
Constructor Detail
-
ReusingSortMergeCoGroupIterator
public ReusingSortMergeCoGroupIterator(MutableObjectIterator<T1> input1, MutableObjectIterator<T2> input2, TypeSerializer<T1> serializer1, TypeComparator<T1> groupingComparator1, TypeSerializer<T2> serializer2, TypeComparator<T2> groupingComparator2, TypePairComparator<T1,T2> pairComparator)
-
-
Method Detail
-
open
public void open()
Description copied from interface:CoGroupTaskIterator
General-purpose open method.- Specified by:
open
in interfaceCoGroupTaskIterator<T1,T2>
-
close
public void close()
Description copied from interface:CoGroupTaskIterator
General-purpose close method.- Specified by:
close
in interfaceCoGroupTaskIterator<T1,T2>
-
getValues1
public Iterable<T1> getValues1()
Description copied from interface:CoGroupTaskIterator
Returns an iterable over the left input values for the current key.- Specified by:
getValues1
in interfaceCoGroupTaskIterator<T1,T2>
- Returns:
- an iterable over the left input values for the current key.
-
getValues2
public Iterable<T2> getValues2()
Description copied from interface:CoGroupTaskIterator
Returns an iterable over the left input values for the current key.- Specified by:
getValues2
in interfaceCoGroupTaskIterator<T1,T2>
- Returns:
- an iterable over the left input values for the current key.
-
next
public boolean next() throws IOException
Description copied from interface:CoGroupTaskIterator
Moves the internal pointer to the next key (if present). Returns true if the operation was successful or false if no more keys are present.The key is not necessarily shared by both inputs. In that case an empty iterator is returned by getValues1() or getValues2().
- Specified by:
next
in interfaceCoGroupTaskIterator<T1,T2>
- Returns:
- true on success, false if no more keys are present
- Throws:
IOException
-
-