public class ReusingBuildFirstHashJoinIterator<V1,V2,O> extends HashJoinIteratorBase implements JoinTaskIterator<V1,V2,O>
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.Modifier and Type | Field and Description |
---|---|
protected MutableHashTable<V1,V2> |
hashJoin |
protected TypeSerializer<V2> |
probeSideSerializer |
Constructor and Description |
---|
ReusingBuildFirstHashJoinIterator(MutableObjectIterator<V1> firstInput,
MutableObjectIterator<V2> secondInput,
TypeSerializer<V1> serializer1,
TypeComparator<V1> comparator1,
TypeSerializer<V2> serializer2,
TypeComparator<V2> comparator2,
TypePairComparator<V2,V1> pairComparator,
MemoryManager memManager,
IOManager ioManager,
AbstractInvokable ownerTask,
double memoryFraction,
boolean probeSideOuterJoin,
boolean buildSideOuterJoin,
boolean useBitmapFilters) |
Modifier and Type | Method and Description |
---|---|
void |
abort()
Aborts the matching process.
|
boolean |
callWithNextKey(FlatJoinFunction<V1,V2,O> matchFunction,
Collector<O> collector)
Moves the internal pointer to the next key that both inputs share.
|
void |
close()
General-purpose close method.
|
void |
open()
General-purpose open method.
|
getHashJoin
protected final MutableHashTable<V1,V2> hashJoin
protected final TypeSerializer<V2> probeSideSerializer
public ReusingBuildFirstHashJoinIterator(MutableObjectIterator<V1> firstInput, MutableObjectIterator<V2> secondInput, TypeSerializer<V1> serializer1, TypeComparator<V1> comparator1, TypeSerializer<V2> serializer2, TypeComparator<V2> comparator2, TypePairComparator<V2,V1> pairComparator, MemoryManager memManager, IOManager ioManager, AbstractInvokable ownerTask, double memoryFraction, boolean probeSideOuterJoin, boolean buildSideOuterJoin, boolean useBitmapFilters) throws MemoryAllocationException
MemoryAllocationException
public void open() throws IOException, MemoryAllocationException, InterruptedException
JoinTaskIterator
open
in interface JoinTaskIterator<V1,V2,O>
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.public void close()
JoinTaskIterator
close
in interface JoinTaskIterator<V1,V2,O>
public final boolean callWithNextKey(FlatJoinFunction<V1,V2,O> matchFunction, Collector<O> collector) throws Exception
JoinTaskIterator
callWithNextKey
in interface JoinTaskIterator<V1,V2,O>
matchFunction
- The match stub containing the match function which is called with the keys.collector
- The collector to pass the match function.Exception
- Exceptions from the user code are forwarded.public void abort()
JoinTaskIterator
abort
in interface JoinTaskIterator<V1,V2,O>
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.