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 final org.apache.flink.api.common.typeutils.TypeComparator<T>
    The utilities to hash and compare the build side data types.
    protected final org.apache.flink.api.common.typeutils.TypeSerializer<T>
    The utilities to serialize the build side data types.
    protected boolean
    Flag to mark the table as open / closed.
    protected final Object
    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

    Modifier and Type
    Method
    Description
    abstract void
     
    abstract void
    Closes the hash table.
    org.apache.flink.api.common.typeutils.TypeComparator<T>
     
    org.apache.flink.api.common.typeutils.TypeSerializer<T>
     
    abstract org.apache.flink.util.MutableObjectIterator<T>
     
    abstract List<org.apache.flink.core.memory.MemorySegment>
     
    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
     
    abstract void
    Initialize the hash table

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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.
  • Constructor Details

    • AbstractMutableHashTable

      public AbstractMutableHashTable(org.apache.flink.api.common.typeutils.TypeSerializer<T> buildSideSerializer, org.apache.flink.api.common.typeutils.TypeComparator<T> buildSideComparator)
  • Method Details

    • 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)