Class NonReusingBuildSecondHashJoinIterator<V1,V2,O>

java.lang.Object
org.apache.flink.runtime.operators.hash.HashJoinIteratorBase
org.apache.flink.runtime.operators.hash.NonReusingBuildSecondHashJoinIterator<V1,V2,O>
All Implemented Interfaces:
JoinTaskIterator<V1,V2,O>
Direct Known Subclasses:
NonReusingBuildSecondReOpenableHashJoinIterator

public class NonReusingBuildSecondHashJoinIterator<V1,V2,O> extends HashJoinIteratorBase implements JoinTaskIterator<V1,V2,O>
An implementation of the JoinTaskIterator that uses a hybrid-hash-join internally to match the records with equal key. The build side of the hash is the second input of the match.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final MutableHashTable<V2,V1>
     
    protected final org.apache.flink.api.common.typeutils.TypeSerializer<V1>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    NonReusingBuildSecondHashJoinIterator(org.apache.flink.util.MutableObjectIterator<V1> firstInput, org.apache.flink.util.MutableObjectIterator<V2> secondInput, org.apache.flink.api.common.typeutils.TypeSerializer<V1> serializer1, org.apache.flink.api.common.typeutils.TypeComparator<V1> comparator1, org.apache.flink.api.common.typeutils.TypeSerializer<V2> serializer2, org.apache.flink.api.common.typeutils.TypeComparator<V2> comparator2, org.apache.flink.api.common.typeutils.TypePairComparator<V1,V2> pairComparator, MemoryManager memManager, IOManager ioManager, AbstractInvokable ownerTask, double memoryFraction, boolean probeSideOuterJoin, boolean buildSideOuterJoin, boolean useBitmapFilters)
     
  • 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.

    Methods inherited from class org.apache.flink.runtime.operators.hash.HashJoinIteratorBase

    getHashJoin

    Methods inherited from class java.lang.Object

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

    • hashJoin

      protected final MutableHashTable<V2,V1> hashJoin
    • probeSideSerializer

      protected final org.apache.flink.api.common.typeutils.TypeSerializer<V1> probeSideSerializer
  • Constructor Details

    • NonReusingBuildSecondHashJoinIterator

      public NonReusingBuildSecondHashJoinIterator(org.apache.flink.util.MutableObjectIterator<V1> firstInput, org.apache.flink.util.MutableObjectIterator<V2> secondInput, org.apache.flink.api.common.typeutils.TypeSerializer<V1> serializer1, org.apache.flink.api.common.typeutils.TypeComparator<V1> comparator1, org.apache.flink.api.common.typeutils.TypeSerializer<V2> serializer2, org.apache.flink.api.common.typeutils.TypeComparator<V2> comparator2, org.apache.flink.api.common.typeutils.TypePairComparator<V1,V2> pairComparator, MemoryManager memManager, IOManager ioManager, AbstractInvokable ownerTask, double memoryFraction, boolean probeSideOuterJoin, boolean buildSideOuterJoin, boolean useBitmapFilters) throws MemoryAllocationException
      Throws:
      MemoryAllocationException
  • Method Details

    • open

      Description copied from interface: JoinTaskIterator
      General-purpose open method. Initializes the internal strategy (for example triggers the sorting of the inputs or starts building hash tables).
      Specified by:
      open in interface JoinTaskIterator<V1,V2,O>
      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

      public void close()
      Description copied from interface: JoinTaskIterator
      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.
      Specified by:
      close in interface JoinTaskIterator<V1,V2,O>
    • callWithNextKey

      public boolean callWithNextKey(org.apache.flink.api.common.functions.FlatJoinFunction<V1,V2,O> matchFunction, org.apache.flink.util.Collector<O> collector) throws Exception
      Description copied from interface: JoinTaskIterator
      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.
      Specified by:
      callWithNextKey in interface JoinTaskIterator<V1,V2,O>
      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

      public void abort()
      Description copied from interface: JoinTaskIterator
      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.
      Specified by:
      abort in interface JoinTaskIterator<V1,V2,O>