public class HFileDataBlock extends HFileBlock
HFileBlockType.DATA block.| Modifier and Type | Field and Description |
|---|---|
protected int |
uncompressedContentEndRelativeOffset |
byteBuff, bytesPerChecksum, compressedByteBuff, context, HFILEBLOCK_HEADER_SIZE, HFILEBLOCK_HEADER_SIZE_NO_CHECKSUM, onDiskSizeWithoutHeader, sizeCheckSum, startOffsetInBuff, startOffsetInCompressedBuff, uncompressedEndOffset, uncompressedSizeWithoutHeader| Modifier | Constructor and Description |
|---|---|
protected |
HFileDataBlock(HFileContext context,
byte[] byteBuff,
int startOffsetInBuff) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
next(HFileCursor cursor,
int blockStartOffsetInFile)
Moves the cursor to next
KeyValue. |
KeyValue |
readKeyValue(int offset)
Reads the key value at the offset.
|
int |
seekTo(HFileCursor cursor,
Key key,
int blockStartOffsetInFile)
Seeks to the key to look up.
|
allocateBufferForUnpacking, getBlockType, getByteBuff, getOnDiskSizeWithHeader, parse, unpackprotected final int uncompressedContentEndRelativeOffset
protected HFileDataBlock(HFileContext context, byte[] byteBuff, int startOffsetInBuff)
public int seekTo(HFileCursor cursor, Key key, int blockStartOffsetInFile)
cursor - HFileCursor containing the current position relative
to the beginning of the HFile (not the block start offset).key - key to look up.blockStartOffsetInFile - the start offset of the block relative to the beginning of the
HFile.public KeyValue readKeyValue(int offset)
offset - offset to read relative to the start of byteBuff.KeyValue instance.public boolean next(HFileCursor cursor, int blockStartOffsetInFile)
KeyValue.cursor - HFileCursor instance containing the current position.blockStartOffsetInFile - the start offset of the block relative to the beginning of the
HFile.true if there is next KeyValue; {code false} otherwise.Copyright © 2024 The Apache Software Foundation. All rights reserved.