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:
org.apache.flink.core.memory.MemorySegmentSource
-
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
ConstructorsConstructorDescriptionReOpenableMutableHashTable(org.apache.flink.api.common.typeutils.TypeSerializer<BT> buildSideSerializer, org.apache.flink.api.common.typeutils.TypeSerializer<PT> probeSideSerializer, org.apache.flink.api.common.typeutils.TypeComparator<BT> buildSideComparator, org.apache.flink.api.common.typeutils.TypeComparator<PT> probeSideComparator, org.apache.flink.api.common.typeutils.TypePairComparator<PT, BT> comparator, List<org.apache.flink.core.memory.MemorySegment> memorySegments, IOManager ioManager, boolean useBitmapFilters) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the hash table.protected HashPartition<BT,PT> getNewInMemoryPartition(int number, int recursionLevel) Returns a new inMemoryPartition object.voidopen(org.apache.flink.util.MutableObjectIterator<BT> buildSide, org.apache.flink.util.MutableObjectIterator<PT> probeSide, boolean buildSideOuterJoin) Opens the hash join.protected booleanprotected voidReleases the table (the array of buckets) and returns the occupied memory segments to the list of free segments.voidreopenProbe(org.apache.flink.util.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 Details
-
ReOpenableMutableHashTable
public ReOpenableMutableHashTable(org.apache.flink.api.common.typeutils.TypeSerializer<BT> buildSideSerializer, org.apache.flink.api.common.typeutils.TypeSerializer<PT> probeSideSerializer, org.apache.flink.api.common.typeutils.TypeComparator<BT> buildSideComparator, org.apache.flink.api.common.typeutils.TypeComparator<PT> probeSideComparator, org.apache.flink.api.common.typeutils.TypePairComparator<PT, BT> comparator, List<org.apache.flink.core.memory.MemorySegment> memorySegments, IOManager ioManager, boolean useBitmapFilters)
-
-
Method Details
-
open
public void open(org.apache.flink.util.MutableObjectIterator<BT> buildSide, org.apache.flink.util.MutableObjectIterator<PT> probeSide, boolean buildSideOuterJoin) throws IOException Description copied from class:MutableHashTableOpens 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:
openin 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(org.apache.flink.util.MutableObjectIterator<PT> probeInput) throws IOException - Throws:
IOException
-
prepareNextPartition
- Overrides:
prepareNextPartitionin classMutableHashTable<BT,PT> - Throws:
IOException
-
releaseTable
protected void releaseTable()Description copied from class:MutableHashTableReleases the table (the array of buckets) and returns the occupied memory segments to the list of free segments.- Overrides:
releaseTablein classMutableHashTable<BT,PT>
-
getNewInMemoryPartition
Description copied from class:MutableHashTableReturns a new inMemoryPartition object. This is required as a plug for ReOpenableMutableHashTable.- Overrides:
getNewInMemoryPartitionin classMutableHashTable<BT,PT>
-
close
public void close()Description copied from class:MutableHashTableCloses 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:
closein classMutableHashTable<BT,PT>
-