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 TypeComparator<T>
buildSideComparator
The utilities to hash and compare the build side data types.protected 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(TypeSerializer<T> buildSideSerializer, 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.TypeComparator<T>
getBuildSideComparator()
TypeSerializer<T>
getBuildSideSerializer()
abstract MutableObjectIterator<T>
getEntryIterator()
abstract List<MemorySegment>
getFreeMemory()
abstract <PT> AbstractHashTableProber<PT,T>
getProber(TypeComparator<PT> probeSideComparator, 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 TypeSerializer<T> buildSideSerializer
The utilities to serialize the build side data types.
-
buildSideComparator
protected final 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.
-
-
Constructor Detail
-
AbstractMutableHashTable
public AbstractMutableHashTable(TypeSerializer<T> buildSideSerializer, TypeComparator<T> buildSideComparator)
-
-
Method Detail
-
getBuildSideSerializer
public TypeSerializer<T> getBuildSideSerializer()
-
getBuildSideComparator
public 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<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 MutableObjectIterator<T> getEntryIterator()
-
getProber
public abstract <PT> AbstractHashTableProber<PT,T> getProber(TypeComparator<PT> probeSideComparator, TypePairComparator<PT,T> pairComparator)
-
-