Interface JoinTaskIterator<V1,V2,O>

All Known Implementing Classes:
AbstractMergeInnerJoinIterator, AbstractMergeIterator, AbstractMergeOuterJoinIterator, NonReusingBuildFirstHashJoinIterator, NonReusingBuildFirstReOpenableHashJoinIterator, NonReusingBuildSecondHashJoinIterator, NonReusingBuildSecondReOpenableHashJoinIterator, NonReusingMergeInnerJoinIterator, NonReusingMergeOuterJoinIterator, ReusingBuildFirstHashJoinIterator, ReusingBuildFirstReOpenableHashJoinIterator, ReusingBuildSecondHashJoinIterator, ReusingBuildSecondReOpenableHashJoinIterator, ReusingMergeInnerJoinIterator, ReusingMergeOuterJoinIterator

public interface JoinTaskIterator<V1,V2,O>
Interface of an iterator that performs the logic of a match task. The iterator follows the open/next/close principle. The next logic here calls the match stub with all value pairs that share the same key.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Aborts the matching process.
    boolean
    callWithNextKey(org.apache.flink.api.common.functions.FlatJoinFunction<V1,V2,O> matchFunction, org.apache.flink.util.Collector<O> collector)
    Moves the internal pointer to the next key that both inputs share.
    void
    General-purpose close method.
    void
    General-purpose open method.
  • Method Details

    • open

      General-purpose open method. Initializes the internal strategy (for example triggers the sorting of the inputs or starts building hash tables).
      Throws:
      IOException - Thrown, if an I/O error occurred while preparing the data. An example is a failing external sort.
      MemoryAllocationException - Thrown, if the internal strategy could not allocate the memory it needs.
      InterruptedException - Thrown, if the thread was interrupted during the initialization process.
    • close

      void close()
      General-purpose close method. Works after the principle of best effort. The internal structures are released, but errors that occur on the way are not reported.
    • callWithNextKey

      boolean callWithNextKey(org.apache.flink.api.common.functions.FlatJoinFunction<V1,V2,O> matchFunction, org.apache.flink.util.Collector<O> collector) throws Exception
      Moves the internal pointer to the next key that both inputs share. It calls the match stub with the cross product of all values that share the same key.
      Parameters:
      matchFunction - The match stub containing the match function which is called with the keys.
      collector - The collector to pass the match function.
      Returns:
      True, if a next key exists, false if no more keys exist.
      Throws:
      Exception - Exceptions from the user code are forwarded.
    • abort

      void abort()
      Aborts the matching process. This extra abort method is supplied, because a significant time may pass while calling the match stub with the cross product of all values that share the same key. A call to this abort method signals an interrupt to that procedure.