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(org.apache.flink.util.MutableObjectIterator<T1> input1, org.apache.flink.util.MutableObjectIterator<T2> input2, org.apache.flink.api.common.typeutils.TypeSerializer<T1> serializer1, org.apache.flink.api.common.typeutils.TypeComparator<T1> groupingComparator1, org.apache.flink.api.common.typeutils.TypeSerializer<T2> serializer2, org.apache.flink.api.common.typeutils.TypeComparator<T2> groupingComparator2, org.apache.flink.api.common.typeutils.TypePairComparator<T1,T2> pairComparator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()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.booleannext()Moves the internal pointer to the next key (if present).voidopen()General-purpose open method.
-
-
-
Constructor Detail
-
ReusingSortMergeCoGroupIterator
public ReusingSortMergeCoGroupIterator(org.apache.flink.util.MutableObjectIterator<T1> input1, org.apache.flink.util.MutableObjectIterator<T2> input2, org.apache.flink.api.common.typeutils.TypeSerializer<T1> serializer1, org.apache.flink.api.common.typeutils.TypeComparator<T1> groupingComparator1, org.apache.flink.api.common.typeutils.TypeSerializer<T2> serializer2, org.apache.flink.api.common.typeutils.TypeComparator<T2> groupingComparator2, org.apache.flink.api.common.typeutils.TypePairComparator<T1,T2> pairComparator)
-
-
Method Detail
-
open
public void open()
Description copied from interface:CoGroupTaskIteratorGeneral-purpose open method.- Specified by:
openin interfaceCoGroupTaskIterator<T1,T2>
-
close
public void close()
Description copied from interface:CoGroupTaskIteratorGeneral-purpose close method.- Specified by:
closein interfaceCoGroupTaskIterator<T1,T2>
-
getValues1
public Iterable<T1> getValues1()
Description copied from interface:CoGroupTaskIteratorReturns an iterable over the left input values for the current key.- Specified by:
getValues1in interfaceCoGroupTaskIterator<T1,T2>- Returns:
- an iterable over the left input values for the current key.
-
getValues2
public Iterable<T2> getValues2()
Description copied from interface:CoGroupTaskIteratorReturns an iterable over the left input values for the current key.- Specified by:
getValues2in interfaceCoGroupTaskIterator<T1,T2>- Returns:
- an iterable over the left input values for the current key.
-
next
public boolean next() throws IOExceptionDescription copied from interface:CoGroupTaskIteratorMoves 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:
nextin interfaceCoGroupTaskIterator<T1,T2>- Returns:
- true on success, false if no more keys are present
- Throws:
IOException
-
-