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 forLongHybridHashTable
.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
LongHashPartition.MatchIterator
Iterator for probe match.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
deserializeFromPages(org.apache.flink.table.data.binary.BinaryRowData reuse, org.apache.flink.runtime.io.disk.iomanager.ChannelReaderInputView inView, BinaryRowDataSerializer buildSideSerializer)
LongHashPartition.MatchIterator
get(long key, int hashCode)
Returns an iterator for all the values for the given key, or null if no value found.org.apache.flink.core.memory.MemorySegment[]
getBuckets()
protected int
getLimitForSegment(org.apache.flink.core.memory.MemorySegment segment)
protected org.apache.flink.core.memory.MemorySegment
nextSegment(org.apache.flink.core.memory.MemorySegment current)
void
serializeToPages(org.apache.flink.table.data.binary.BinaryRowData row)
void
setReadPosition(long pointer)
-
Methods inherited from class org.apache.flink.runtime.memory.AbstractPagedInputView
advance, clear, doAdvance, getCurrentPositionInSegment, getCurrentSegment, getCurrentSegmentLimit, getHeaderLength, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, seekInput, skipBytes, skipBytesToRead
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
-
-
-
-
Method Detail
-
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 interfaceorg.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 classorg.apache.flink.runtime.memory.AbstractPagedInputView
- Throws:
IOException
-
getLimitForSegment
protected int getLimitForSegment(org.apache.flink.core.memory.MemorySegment segment)
- Specified by:
getLimitForSegment
in classorg.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
-
-