public class LongHashPartition extends AbstractPagedInputView implements 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.
Modifier and Type | Class and Description |
---|---|
class |
LongHashPartition.MatchIterator
Iterator for probe match.
|
headerLength
Modifier and Type | Method and Description |
---|---|
static void |
deserializeFromPages(BinaryRowData reuse,
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.
|
MemorySegment[] |
getBuckets() |
protected int |
getLimitForSegment(MemorySegment segment)
Gets the limit for reading bytes from the given memory segment.
|
protected MemorySegment |
nextSegment(MemorySegment current)
The method by which concrete subclasses realize page crossing.
|
void |
serializeToPages(BinaryRowData row) |
void |
setReadPosition(long pointer)
Sets the read pointer to the given position.
|
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
read, read, skipBytesToRead
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
public LongHashPartition.MatchIterator get(long key, int hashCode)
public MemorySegment[] getBuckets()
public void setReadPosition(long pointer)
SeekableDataInputView
setReadPosition
in interface SeekableDataInputView
pointer
- The new read position.protected MemorySegment nextSegment(MemorySegment current) throws IOException
AbstractPagedInputView
EOFException
.nextSegment
in class AbstractPagedInputView
current
- The current page that was read to its limit. May be null
, if this
method is invoked for the first time.null
. If the
input is exhausted, an EOFException
must be thrown instead.EOFException
- Thrown, if no further segment is available.IOException
- Thrown, if the method cannot provide the next page due to an I/O related
problem.protected int getLimitForSegment(MemorySegment segment)
AbstractPagedInputView
getLimitForSegment
in class AbstractPagedInputView
segment
- The segment to determine the limit for.public void serializeToPages(BinaryRowData row) throws IOException
IOException
public static void deserializeFromPages(BinaryRowData reuse, ChannelReaderInputView inView, BinaryRowDataSerializer buildSideSerializer) throws IOException
IOException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.