public class HFileRootIndexBlock extends HFileIndexBlock
HFileBlockType.ROOT_INDEX block.blockDataSize, entriesbyteBuff, bytesPerChecksum, compressedByteBuff, context, HFILEBLOCK_HEADER_SIZE, HFILEBLOCK_HEADER_SIZE_NO_CHECKSUM, onDiskSizeWithoutHeader, sizeCheckSum, startOffsetInBuff, startOffsetInCompressedBuff, uncompressedEndOffset, uncompressedSizeWithoutHeader| Constructor and Description |
|---|
HFileRootIndexBlock(HFileContext context,
byte[] byteBuff,
int startOffsetInBuff) |
| Modifier and Type | Method and Description |
|---|---|
static HFileRootIndexBlock |
createRootIndexBlockToWrite(HFileContext context) |
ByteBuffer |
getUncompressedBlockDataToWrite()
Returns serialized "data" part of the block.
|
TreeMap<Key,BlockIndexEntry> |
readBlockIndex(int numEntries,
boolean contentKeyOnly)
Reads the index block and returns the block index entry to an in-memory
TreeMap
for searches. |
List<BlockIndexEntry> |
readBlockIndexEntry(int numEntries,
boolean contentKeyOnly)
Returns the block index entries contained in the root index block.
|
add, getNumOfEntries, isEmptyallocateBufferForUnpacking, getBlockType, getByteBuff, getOnDiskSizeWithHeader, getStartOffsetInBuffForWrite, parse, serialize, setStartOffsetInBuffForWrite, unpackpublic HFileRootIndexBlock(HFileContext context, byte[] byteBuff, int startOffsetInBuff)
public static HFileRootIndexBlock createRootIndexBlockToWrite(HFileContext context)
public TreeMap<Key,BlockIndexEntry> readBlockIndex(int numEntries, boolean contentKeyOnly)
TreeMap
for searches.numEntries - the number of entries in the blockcontentKeyOnly - whether the key part contains content onlyTreeMap of block index entriespublic List<BlockIndexEntry> readBlockIndexEntry(int numEntries, boolean contentKeyOnly)
numEntries - the number of entries in the blockcontentKeyOnly - whether the key part contains content onlyList of block index entriespublic ByteBuffer getUncompressedBlockDataToWrite() throws IOException
HFileBlockgetUncompressedBlockDataToWrite in class HFileBlockIOExceptionCopyright © 2025 The Apache Software Foundation. All rights reserved.