|Modifier and Type||Method and Description|
Read in a file block.
HFileBlock readBlock(long offset, long onDiskBlockSize, boolean cacheBlock, boolean pread, boolean isCompaction, boolean updateCacheMetrics, BlockType expectedBlockType, DataBlockEncoding expectedDataBlockEncoding) throws IOException
offset- offset to read.
onDiskBlockSize- size of the block
isCompaction- is this block being read as part of a compaction
expectedBlockType- the block type we are expecting to read with this read operation, or null to read whatever block type is available and avoid checking (that might reduce caching efficiency of encoded data blocks)
expectedDataBlockEncoding- the data block encoding the caller is expecting data blocks to be in, or null to not perform this check and return the block irrespective of the encoding. This check only applies to data blocks and can be set to null when the caller is expecting to read a non-data block and has set expectedBlockType accordingly.
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.