Class LongHashPartition
- All Implemented Interfaces:
DataInput,org.apache.flink.core.memory.DataInputView,org.apache.flink.core.memory.SeekableDataInputView
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.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.apache.flink.runtime.memory.AbstractPagedInputView
headerLength -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeserializeFromPages(org.apache.flink.table.data.binary.BinaryRowData reuse, org.apache.flink.runtime.io.disk.iomanager.ChannelReaderInputView inView, BinaryRowDataSerializer buildSideSerializer) 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[]protected intgetLimitForSegment(org.apache.flink.core.memory.MemorySegment segment) protected org.apache.flink.core.memory.MemorySegmentnextSegment(org.apache.flink.core.memory.MemorySegment current) voidserializeToPages(org.apache.flink.table.data.binary.BinaryRowData row) voidsetReadPosition(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, skipBytesToReadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytesMethods inherited from interface org.apache.flink.core.memory.DataInputView
read, read, skipBytesToRead
-
Method Details
-
get
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:
setReadPositionin 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:
nextSegmentin classorg.apache.flink.runtime.memory.AbstractPagedInputView- Throws:
IOException
-
getLimitForSegment
protected int getLimitForSegment(org.apache.flink.core.memory.MemorySegment segment) - Specified by:
getLimitForSegmentin 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
-