Class AbstractMutableHashTable<T>
- java.lang.Object
-
- org.apache.flink.runtime.operators.hash.AbstractMutableHashTable<T>
-
- Direct Known Subclasses:
CompactingHashTable
,InPlaceMutableHashTable
public abstract class AbstractMutableHashTable<T> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.flink.api.common.typeutils.TypeComparator<T>
buildSideComparator
The utilities to hash and compare the build side data types.protected org.apache.flink.api.common.typeutils.TypeSerializer<T>
buildSideSerializer
The utilities to serialize the build side data types.protected boolean
closed
Flag to mark the table as open / closed.protected Object
stateLock
The lock to synchronize state changes (open / close) on
-
Constructor Summary
Constructors Constructor Description AbstractMutableHashTable(org.apache.flink.api.common.typeutils.TypeSerializer<T> buildSideSerializer, org.apache.flink.api.common.typeutils.TypeComparator<T> buildSideComparator)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
abort()
abstract void
close()
Closes the hash table.org.apache.flink.api.common.typeutils.TypeComparator<T>
getBuildSideComparator()
org.apache.flink.api.common.typeutils.TypeSerializer<T>
getBuildSideSerializer()
abstract org.apache.flink.util.MutableObjectIterator<T>
getEntryIterator()
abstract List<org.apache.flink.core.memory.MemorySegment>
getFreeMemory()
abstract <PT> AbstractHashTableProber<PT,T>
getProber(org.apache.flink.api.common.typeutils.TypeComparator<PT> probeSideComparator, org.apache.flink.api.common.typeutils.TypePairComparator<PT,T> pairComparator)
abstract void
insert(T record)
abstract void
insertOrReplaceRecord(T record)
abstract void
open()
Initialize the hash table
-
-
-
Field Detail
-
buildSideSerializer
protected final org.apache.flink.api.common.typeutils.TypeSerializer<T> buildSideSerializer
The utilities to serialize the build side data types.
-
buildSideComparator
protected final org.apache.flink.api.common.typeutils.TypeComparator<T> buildSideComparator
The utilities to hash and compare the build side data types.
-
stateLock
protected final Object stateLock
The lock to synchronize state changes (open / close) on
-
closed
protected boolean closed
Flag to mark the table as open / closed. Because we allow to open and close multiple times, the state is initially closed.
-
-
Method Detail
-
getBuildSideSerializer
public org.apache.flink.api.common.typeutils.TypeSerializer<T> getBuildSideSerializer()
-
getBuildSideComparator
public org.apache.flink.api.common.typeutils.TypeComparator<T> getBuildSideComparator()
-
open
public abstract void open()
Initialize the hash table
-
close
public abstract void close()
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 a cancellation call, which cleans up all resources that are currently held by the hash table. If another process still accesses the hash table after close has been called, no operations will be performed.
-
abort
public abstract void abort()
-
getFreeMemory
public abstract List<org.apache.flink.core.memory.MemorySegment> getFreeMemory()
-
insert
public abstract void insert(T record) throws IOException
- Throws:
IOException
-
insertOrReplaceRecord
public abstract void insertOrReplaceRecord(T record) throws IOException
- Throws:
IOException
-
getEntryIterator
public abstract org.apache.flink.util.MutableObjectIterator<T> getEntryIterator()
-
getProber
public abstract <PT> AbstractHashTableProber<PT,T> getProber(org.apache.flink.api.common.typeutils.TypeComparator<PT> probeSideComparator, org.apache.flink.api.common.typeutils.TypePairComparator<PT,T> pairComparator)
-
-