public class SortMergeCoGroupIterator<T1,T2> extends Object implements CoGroupTaskIterator<T1,T2>
| Constructor and Description |
|---|
SortMergeCoGroupIterator(MutableObjectIterator<T1> input1,
MutableObjectIterator<T2> input2,
TypeSerializer<T1> serializer1,
TypeComparator<T1> groupingComparator1,
TypeSerializer<T2> serializer2,
TypeComparator<T2> groupingComparator2,
TypePairComparator<T1,T2> pairComparator) |
| Modifier and Type | Method and 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.
|
public SortMergeCoGroupIterator(MutableObjectIterator<T1> input1, MutableObjectIterator<T2> input2, TypeSerializer<T1> serializer1, TypeComparator<T1> groupingComparator1, TypeSerializer<T2> serializer2, TypeComparator<T2> groupingComparator2, TypePairComparator<T1,T2> pairComparator)
public void open()
CoGroupTaskIteratoropen in interface CoGroupTaskIterator<T1,T2>public void close()
CoGroupTaskIteratorclose in interface CoGroupTaskIterator<T1,T2>public Iterable<T1> getValues1()
CoGroupTaskIteratorgetValues1 in interface CoGroupTaskIterator<T1,T2>public Iterable<T2> getValues2()
CoGroupTaskIteratorgetValues2 in interface CoGroupTaskIterator<T1,T2>public boolean next()
throws IOException
CoGroupTaskIteratorThe key is not necessarily shared by both inputs. In that case an empty iterator is returned by getValues1() or getValues2().
next in interface CoGroupTaskIterator<T1,T2>IOExceptionCopyright © 2015 The Apache Software Foundation. All rights reserved.