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 theJoinTaskIteratorthat 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 MutableHashTable<V2,V1>hashJoinprotected org.apache.flink.api.common.typeutils.TypeSerializer<V1>probeSideSerializer
-
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()Aborts the matching process.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 Detail
-
hashJoin
protected final MutableHashTable<V2,V1> hashJoin
-
probeSideSerializer
protected final org.apache.flink.api.common.typeutils.TypeSerializer<V1> probeSideSerializer
-
-
Constructor Detail
-
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 Detail
-
open
public void open() throws IOException, MemoryAllocationException, InterruptedExceptionDescription 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 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: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>
-
-