Class LongHashPartition

java.lang.Object
org.apache.flink.runtime.memory.AbstractPagedInputView
org.apache.flink.table.runtime.hashtable.LongHashPartition
All Implemented Interfaces:
DataInput, org.apache.flink.core.memory.DataInputView, org.apache.flink.core.memory.SeekableDataInputView

public class LongHashPartition extends org.apache.flink.runtime.memory.AbstractPagedInputView implements org.apache.flink.core.memory.SeekableDataInputView
Partition for LongHybridHashTable.

The layout of the buckets inside a memory segment is as follows:

Hash mode: +----------------------------- Bucket area ---------------------------- | long key (8 bytes) | address (8 bytes) | | long key (8 bytes) | address (8 bytes) | | long key (8 bytes) | address (8 bytes) | | ... +----------------------------- Data area -------------------------- | size & address of next row with the same key (8bytes) | binary row | | size & address of next row with the same key (8bytes) | binary row | | size & address of next row with the same key (8bytes) | binary row | | ...

Dense mode: +----------------------------- Bucket area ---------------------------- | address1 (8 bytes) | address2 (8 bytes) | address3 (8 bytes) | ... Directly addressed by the index of the corresponding array of key values.

  • Method Details

    • get

      public LongHashPartition.MatchIterator get(long key, int hashCode)
      Returns an iterator for all the values for the given key, or null if no value found.
    • getBuckets

      public org.apache.flink.core.memory.MemorySegment[] getBuckets()
    • setReadPosition

      public void setReadPosition(long pointer)
      Specified by:
      setReadPosition in interface org.apache.flink.core.memory.SeekableDataInputView
    • nextSegment

      protected org.apache.flink.core.memory.MemorySegment nextSegment(org.apache.flink.core.memory.MemorySegment current) throws IOException
      Specified by:
      nextSegment in class org.apache.flink.runtime.memory.AbstractPagedInputView
      Throws:
      IOException
    • getLimitForSegment

      protected int getLimitForSegment(org.apache.flink.core.memory.MemorySegment segment)
      Specified by:
      getLimitForSegment in class org.apache.flink.runtime.memory.AbstractPagedInputView
    • serializeToPages

      public void serializeToPages(org.apache.flink.table.data.binary.BinaryRowData row) throws IOException
      Throws:
      IOException
    • deserializeFromPages

      public static void deserializeFromPages(org.apache.flink.table.data.binary.BinaryRowData reuse, org.apache.flink.runtime.io.disk.iomanager.ChannelReaderInputView inView, BinaryRowDataSerializer buildSideSerializer) throws IOException
      Throws:
      IOException