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

    Modifier and Type
    Method
    Description
    void
    General-purpose close method.
    Returns an iterable over the left input values for the current key.
    Returns an iterable over the left input values for the current key.
    boolean
    Moves the internal pointer to the next key (if present).
    void
    General-purpose open method.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • 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 Details

    • open

      public void open()
      Description copied from interface: CoGroupTaskIterator
      General-purpose open method.
      Specified by:
      open in interface CoGroupTaskIterator<T1,T2>
    • close

      public void close()
      Description copied from interface: CoGroupTaskIterator
      General-purpose close method.
      Specified by:
      close in interface CoGroupTaskIterator<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 interface CoGroupTaskIterator<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 interface CoGroupTaskIterator<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 interface CoGroupTaskIterator<T1,T2>
      Returns:
      true on success, false if no more keys are present
      Throws:
      IOException