Interface CoGroupTaskIterator<T1,​T2>

  • Type Parameters:
    T1 - The generic type of the first input's data type.
    T2 - The generic type of the second input's data type.
    All Known Implementing Classes:
    NonReusingSortMergeCoGroupIterator, ReusingSortMergeCoGroupIterator

    public interface CoGroupTaskIterator<T1,​T2>
    Interface describing the methods that have to be implemented by local strategies for the CoGroup Pact.
    • Method Summary

      All Methods Instance Methods Abstract 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.
    • Method Detail

      • close

        void close()
        General-purpose close method.
      • next

        boolean next()
              throws IOException
        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().

        Returns:
        true on success, false if no more keys are present
        Throws:
        IOException
      • getValues1

        Iterable<T1> getValues1()
        Returns an iterable over the left input values for the current key.
        Returns:
        an iterable over the left input values for the current key.
      • getValues2

        Iterable<T2> getValues2()
        Returns an iterable over the left input values for the current key.
        Returns:
        an iterable over the left input values for the current key.