Class ReOpenableMutableHashTable<BT,PT>
- java.lang.Object
-
- org.apache.flink.runtime.operators.hash.MutableHashTable<BT,PT>
-
- org.apache.flink.runtime.operators.hash.ReOpenableMutableHashTable<BT,PT>
-
- All Implemented Interfaces:
MemorySegmentSource
public class ReOpenableMutableHashTable<BT,PT> extends MutableHashTable<BT,PT>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.runtime.operators.hash.MutableHashTable
MutableHashTable.HashBucketIterator<BT,PT>, MutableHashTable.ProbeIterator<PT>, MutableHashTable.UnmatchedBuildIterator<BT,PT>
-
-
Field Summary
-
Fields inherited from class org.apache.flink.runtime.operators.hash.MutableHashTable
availableMemory, buckets, bucketsPerSegmentBits, bucketsPerSegmentMask, buildSideComparator, buildSideSerializer, closed, currentEnumerator, currentRecursionDepth, furtherPartitioning, ioManager, keepBuildSidePartitions, numBuckets, partitionsBeingBuilt, probeIterator, probeSideSerializer, segmentSize, writeBehindBuffers, writeBehindBuffersAvailable
-
-
Constructor Summary
Constructors Constructor Description ReOpenableMutableHashTable(TypeSerializer<BT> buildSideSerializer, TypeSerializer<PT> probeSideSerializer, TypeComparator<BT> buildSideComparator, TypeComparator<PT> probeSideComparator, TypePairComparator<PT,BT> comparator, List<MemorySegment> memorySegments, IOManager ioManager, boolean useBitmapFilters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the hash table.protected HashPartition<BT,PT>
getNewInMemoryPartition(int number, int recursionLevel)
Returns a new inMemoryPartition object.void
open(MutableObjectIterator<BT> buildSide, MutableObjectIterator<PT> probeSide, boolean buildSideOuterJoin)
Opens the hash join.protected boolean
prepareNextPartition()
protected void
releaseTable()
Releases the table (the array of buckets) and returns the occupied memory segments to the list of free segments.void
reopenProbe(MutableObjectIterator<PT> probeInput)
-
Methods inherited from class org.apache.flink.runtime.operators.hash.MutableHashTable
abort, assignPartition, buildBloomFilterForBucketsInPartition, buildInitialTable, buildTableFromSpilledPartition, clearPartitions, createPartitions, getBuildSideIterator, getCurrentProbeRecord, getFreedMemory, getInitialTableSize, getMatchesFor, getNumWriteBehindBuffers, getPartitioningFanOutNoEstimates, getProbeSideComparator, hash, initTable, insertIntoTable, nextRecord, nextSegment, open, processProbeIter, processUnmatchedBuildIter, spillPartition
-
-
-
-
Constructor Detail
-
ReOpenableMutableHashTable
public ReOpenableMutableHashTable(TypeSerializer<BT> buildSideSerializer, TypeSerializer<PT> probeSideSerializer, TypeComparator<BT> buildSideComparator, TypeComparator<PT> probeSideComparator, TypePairComparator<PT,BT> comparator, List<MemorySegment> memorySegments, IOManager ioManager, boolean useBitmapFilters)
-
-
Method Detail
-
open
public void open(MutableObjectIterator<BT> buildSide, MutableObjectIterator<PT> probeSide, boolean buildSideOuterJoin) throws IOException
Description copied from class:MutableHashTable
Opens the hash join. This method reads the build-side input and constructs the initial hash table, gradually spilling partitions that do not fit into memory.- Overrides:
open
in classMutableHashTable<BT,PT>
- Parameters:
buildSide
- Build side input.probeSide
- Probe side input.buildSideOuterJoin
- Whether outer join on build side.- Throws:
IOException
- Thrown, if an I/O problem occurs while spilling a partition.
-
reopenProbe
public void reopenProbe(MutableObjectIterator<PT> probeInput) throws IOException
- Throws:
IOException
-
prepareNextPartition
protected boolean prepareNextPartition() throws IOException
- Overrides:
prepareNextPartition
in classMutableHashTable<BT,PT>
- Throws:
IOException
-
releaseTable
protected void releaseTable()
Description copied from class:MutableHashTable
Releases the table (the array of buckets) and returns the occupied memory segments to the list of free segments.- Overrides:
releaseTable
in classMutableHashTable<BT,PT>
-
getNewInMemoryPartition
protected HashPartition<BT,PT> getNewInMemoryPartition(int number, int recursionLevel)
Description copied from class:MutableHashTable
Returns a new inMemoryPartition object. This is required as a plug for ReOpenableMutableHashTable.- Overrides:
getNewInMemoryPartition
in classMutableHashTable<BT,PT>
-
close
public void close()
Description copied from class:MutableHashTable
Closes the hash table. This effectively releases all internal structures and closes all open files and removes them. The call to this method is valid both as a cleanup after the complete inputs were properly processed, and as an cancellation call, which cleans up all resources that are currently held by the hash join.- Overrides:
close
in classMutableHashTable<BT,PT>
-
-