public class BuildSecondHashMatchIterator<V1,V2,O> extends Object 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 second input of the match.| Modifier and Type | Field and Description |
|---|---|
protected MutableHashTable<V2,V1> |
hashJoin |
protected TypeSerializer<V1> |
probeSideSerializer |
| Constructor and Description |
|---|
BuildSecondHashMatchIterator(MutableObjectIterator<V1> firstInput,
MutableObjectIterator<V2> secondInput,
TypeSerializer<V1> serializer1,
TypeComparator<V1> comparator1,
TypeSerializer<V2> serializer2,
TypeComparator<V2> comparator2,
TypePairComparator<V1,V2> pairComparator,
MemoryManager memManager,
IOManager ioManager,
AbstractInvokable ownerTask,
double memoryFraction) |
| 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.
|
<BT,PT> MutableHashTable<BT,PT> |
getHashJoin(TypeSerializer<BT> buildSideSerializer,
TypeComparator<BT> buildSideComparator,
TypeSerializer<PT> probeSideSerializer,
TypeComparator<PT> probeSideComparator,
TypePairComparator<PT,BT> pairComparator,
MemoryManager memManager,
IOManager ioManager,
AbstractInvokable ownerTask,
double memoryFraction) |
void |
open()
General-purpose open method.
|
protected final MutableHashTable<V2,V1> hashJoin
protected final TypeSerializer<V1> probeSideSerializer
public BuildSecondHashMatchIterator(MutableObjectIterator<V1> firstInput, MutableObjectIterator<V2> secondInput, TypeSerializer<V1> serializer1, TypeComparator<V1> comparator1, TypeSerializer<V2> serializer2, TypeComparator<V2> comparator2, TypePairComparator<V1,V2> pairComparator, MemoryManager memManager, IOManager ioManager, AbstractInvokable ownerTask, double memoryFraction) throws MemoryAllocationException
MemoryAllocationExceptionpublic void open()
throws IOException,
MemoryAllocationException,
InterruptedException
JoinTaskIteratoropen 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()
JoinTaskIteratorclose in interface JoinTaskIterator<V1,V2,O>public boolean callWithNextKey(FlatJoinFunction<V1,V2,O> matchFunction, Collector<O> collector) throws Exception
JoinTaskIteratorcallWithNextKey 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()
JoinTaskIteratorabort in interface JoinTaskIterator<V1,V2,O>public <BT,PT> MutableHashTable<BT,PT> getHashJoin(TypeSerializer<BT> buildSideSerializer, TypeComparator<BT> buildSideComparator, TypeSerializer<PT> probeSideSerializer, TypeComparator<PT> probeSideComparator, TypePairComparator<PT,BT> pairComparator, MemoryManager memManager, IOManager ioManager, AbstractInvokable ownerTask, double memoryFraction) throws MemoryAllocationException
MemoryAllocationExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.