static interface HFileBlock.BlockIterator
HFileBlock
s in load-on-open-section, such as root data index
block, meta index block, file info block etc.Modifier and Type | Method and Description |
---|---|
void |
freeBlocks()
Now we use the
ByteBuffAllocator to manage the nio ByteBuffers for HFileBlocks, so we
must deallocate all of the ByteBuffers in the end life. |
HFileBlock |
nextBlock()
Get the next block, or null if there are no more blocks to iterate.
|
HFileBlock |
nextBlockWithBlockType(BlockType blockType)
Similar to
nextBlock() but checks block type, throws an exception if incorrect, and
returns the HFile block |
HFileBlock nextBlock() throws IOException
IOException
HFileBlock nextBlockWithBlockType(BlockType blockType) throws IOException
nextBlock()
but checks block type, throws an exception if incorrect, and
returns the HFile blockIOException
void freeBlocks()
ByteBuffAllocator
to manage the nio ByteBuffers for HFileBlocks, so we
must deallocate all of the ByteBuffers in the end life. the BlockIterator's life cycle is
starting from opening an HFileReader and stopped when the HFileReader#close, so we will keep
track all the read blocks until we call freeBlocks()
when closing the
HFileReader. Sum bytes of those blocks in load-on-open section should be quite small, so
tracking them should be OK.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.