Class ReusingBuildFirstHashJoinIterator<V1,V2,O>
java.lang.Object
org.apache.flink.runtime.operators.hash.HashJoinIteratorBase
org.apache.flink.runtime.operators.hash.ReusingBuildFirstHashJoinIterator<V1,V2,O>
- All Implemented Interfaces:
JoinTaskIterator<V1,V2, O>
- Direct Known Subclasses:
ReusingBuildFirstReOpenableHashJoinIterator
public class ReusingBuildFirstHashJoinIterator<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 first input of the match.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final MutableHashTable<V1,V2> protected final org.apache.flink.api.common.typeutils.TypeSerializer<V2> -
Constructor Summary
ConstructorsConstructorDescriptionReusingBuildFirstHashJoinIterator(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<V2, V1> pairComparator, MemoryManager memManager, IOManager ioManager, AbstractInvokable ownerTask, double memoryFraction, boolean probeSideOuterJoin, boolean buildSideOuterJoin, boolean useBitmapFilters) -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()Aborts the matching process.final booleancallWithNextKey(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.voidclose()General-purpose close method.voidopen()General-purpose open method.Methods inherited from class org.apache.flink.runtime.operators.hash.HashJoinIteratorBase
getHashJoin
-
Field Details
-
hashJoin
-
probeSideSerializer
-
-
Constructor Details
-
ReusingBuildFirstHashJoinIterator
public ReusingBuildFirstHashJoinIterator(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<V2, V1> 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:JoinTaskIteratorGeneral-purpose open method. Initializes the internal strategy (for example triggers the sorting of the inputs or starts building hash tables).- Specified by:
openin interfaceJoinTaskIterator<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:JoinTaskIteratorGeneral-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:
closein interfaceJoinTaskIterator<V1,V2, O>
-
callWithNextKey
public final boolean callWithNextKey(org.apache.flink.api.common.functions.FlatJoinFunction<V1, V2, throws ExceptionO> matchFunction, org.apache.flink.util.Collector<O> collector) Description copied from interface:JoinTaskIteratorMoves 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:
callWithNextKeyin interfaceJoinTaskIterator<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:JoinTaskIteratorAborts 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:
abortin interfaceJoinTaskIterator<V1,V2, O>
-