Uses of Class
org.apache.hadoop.hbase.io.hfile.HFileBlock
Package
Description
Provides implementations of
HFile
and HFile
BlockCache
.Provides
BucketCache
, an implementation of
BlockCache
.-
Uses of HFileBlock in org.apache.hadoop.hbase.io.hfile
Modifier and TypeClassDescriptionclass
TheByteBuffAllocator
won't allocate pooled heapByteBuff
now; at the same time, if allocate an off-heapByteBuff
from allocator, then it must be a pooled one.class
TheByteBuffAllocator
won't allocate pooled heapByteBuff
now; at the same time, if allocate an off-heapByteBuff
from allocator, then it must be a pooled one.Modifier and TypeFieldDescriptionprotected HFileBlock
HFileReaderImpl.HFileScannerImpl.curBlock
private final HFileBlock
BlockWithScanInfo.hFileBlock
Modifier and TypeFieldDescriptionprivate List<HFileBlock>
HFileInfo.loadOnOpenBlocks
Blocks read from the load-on-open section, excluding data root index, meta index, and file info.protected final ArrayList<HFileBlock>
HFileReaderImpl.HFileScannerImpl.prevBlocks
Modifier and TypeMethodDescriptionHFileBlockBuilder.build()
(package private) static HFileBlock
HFileBlock.createFromBuff
(ByteBuff buf, boolean usesHBaseChecksum, long offset, int nextBlockOnDiskSize, HFileContext fileContext, ByteBuffAllocator allocator) Creates a block from an existing buffer starting with a header.MemcachedBlockCache.HFileBlockTranscoder.decode
(net.spy.memcached.CachedData d) (package private) static HFileBlock
HFileBlock.deepCloneOnHeap
(HFileBlock blk) HFileBlock.BlockDeserializer.deserialize
(ByteBuff buf, ByteBuffAllocator alloc) static HFileBlock
BlockCacheUtil.getBlockForCaching
(CacheConfig cacheConf, HFileBlock block) Similarly to HFileBlock.Writer.getBlockForCaching(), creates a HFileBlock instance without checksum for caching.(package private) HFileBlock
HFileBlock.Writer.getBlockForCaching
(CacheConfig cacheConf) Creates a new HFileBlock.private HFileBlock
CompoundBloomFilter.getBloomBlock
(int block) private HFileBlock
HFileReaderImpl.getCachedBlock
(BlockCacheKey cacheKey, boolean cacheBlock, boolean useLock, boolean updateCacheMetrics, BlockType expectedBlockType, DataBlockEncoding expectedDataBlockEncoding) Retrieve block from cache.HFileReaderImpl.HFileScannerImpl.getCurBlock()
BlockWithScanInfo.getHFileBlock()
HFile.Reader.getMetaBlock
(String metaBlockName, boolean cacheBlock) HFileReaderImpl.getMetaBlock
(String metaBlockName, boolean cacheBlock) HFileBlock.BlockIterator.nextBlock()
Get the next block, or null if there are no more blocks to iterate.HFileBlock.BlockIterator.nextBlockWithBlockType
(BlockType blockType) Similar toHFileBlock.BlockIterator.nextBlock()
but checks block type, throws an exception if incorrect, and returns the HFile blockHFile.CachingBlockReader.readBlock
(long offset, long onDiskBlockSize, boolean cacheBlock, boolean pread, boolean isCompaction, boolean updateCacheMetrics, BlockType expectedBlockType, DataBlockEncoding expectedDataBlockEncoding) Read in a file block.HFile.CachingBlockReader.readBlock
(long offset, long onDiskBlockSize, boolean cacheBlock, boolean pread, boolean isCompaction, boolean updateCacheMetrics, BlockType expectedBlockType, DataBlockEncoding expectedDataBlockEncoding, boolean cacheOnly) HFileReaderImpl.readBlock
(long dataBlockOffset, long onDiskBlockSize, boolean cacheBlock, boolean pread, boolean isCompaction, boolean updateCacheMetrics, BlockType expectedBlockType, DataBlockEncoding expectedDataBlockEncoding) HFileReaderImpl.readBlock
(long dataBlockOffset, long onDiskBlockSize, boolean cacheBlock, boolean pread, boolean isCompaction, boolean updateCacheMetrics, BlockType expectedBlockType, DataBlockEncoding expectedDataBlockEncoding, boolean cacheOnly) HFileBlock.FSReader.readBlockData
(long offset, long onDiskSize, boolean pread, boolean updateMetrics, boolean intoHeap) Reads the block at the given offset in the file with the given on-disk size and uncompressed size.HFileBlock.FSReaderImpl.readBlockData
(long offset, long onDiskSizeWithHeaderL, boolean pread, boolean updateMetrics, boolean intoHeap) Reads a version 2 block (version 1 blocks not supported and not expected).protected HFileBlock
HFileBlock.FSReaderImpl.readBlockDataInternal
(org.apache.hadoop.fs.FSDataInputStream is, long offset, long onDiskSizeWithHeaderL, boolean pread, boolean verifyChecksum, boolean updateMetrics, boolean intoHeap) Reads a version 2 block.protected HFileBlock
HFileReaderImpl.HFileScannerImpl.readNextDataBlock()
Scans blocks in the "scanned" section of theHFile
until the next data block is found.HFileBlock.retain()
HFileBlockIndex.BlockIndexReader.seekToDataBlock
(ExtendedCell key, HFileBlock currentBlock, boolean cacheBlocks, boolean pread, boolean isCompaction, DataBlockEncoding expectedDataBlockEncoding, HFile.CachingBlockReader cachingBlockReader) Return the data block which contains this key.private static HFileBlock
HFileBlock.shallowClone
(HFileBlock blk, ByteBuff newBuf) HFileBlock.touch()
Calling this method in strategic locations where HFileBlocks are referenced may help diagnose potential buffer leaks.(package private) HFileBlock
HFileBlock.unpack
(HFileContext fileContext, HFileBlock.FSReader reader) Retrieves the decompressed/decrypted view of this block.Modifier and TypeMethodDescriptionBlockCache.blockFitsIntoTheCache
(HFileBlock block) Checks whether there's enough space left in the cache to accommodate the passed block.CombinedBlockCache.blockFitsIntoTheCache
(HFileBlock block) private static HFileBlockBuilder
HFileBlock.createBuilder
(HFileBlock blk, ByteBuff newBuff) Creates a new HFileBlockBuilder from the existing block and a new ByteBuff.(package private) static HFileBlock
HFileBlock.deepCloneOnHeap
(HFileBlock blk) net.spy.memcached.CachedData
MemcachedBlockCache.HFileBlockTranscoder.encode
(HFileBlock block) static HFileBlock
BlockCacheUtil.getBlockForCaching
(CacheConfig cacheConf, HFileBlock block) Similarly to HFileBlock.Writer.getBlockForCaching(), creates a HFileBlock instance without checksum for caching.private ByteBuff
HFileReaderImpl.EncodedScanner.getEncodedBuffer
(HFileBlock newBlock) protected ExtendedCell
HFileReaderImpl.EncodedScanner.getFirstKeyCellInBlock
(HFileBlock curBlock) protected ExtendedCell
HFileReaderImpl.HFileScannerImpl.getFirstKeyCellInBlock
(HFileBlock curBlock) private void
NoOpIndexBlockEncoder.NoOpEncodedSeeker.init
(HFileBlock blk, int numEntries) void
HFileIndexBlockEncoder.EncodedSeeker.initRootIndex
(HFileBlock blk, int numEntries, CellComparator comparator, int treeLevel) void
NoOpIndexBlockEncoder.NoOpEncodedSeeker.initRootIndex
(HFileBlock blk, int numEntries, CellComparator comparator, int treeLevel) protected int
HFileReaderImpl.EncodedScanner.loadBlockAndSeekToKey
(HFileBlock seekToBlock, ExtendedCell nextIndexedKey, boolean rewind, ExtendedCell key, boolean seekBefore) protected int
HFileReaderImpl.HFileScannerImpl.loadBlockAndSeekToKey
(HFileBlock seekToBlock, ExtendedCell nextIndexedKey, boolean rewind, ExtendedCell key, boolean seekBefore) abstract BlockWithScanInfo
HFileBlockIndex.BlockIndexReader.loadDataBlockWithScanInfo
(ExtendedCell key, HFileBlock currentBlock, boolean cacheBlocks, boolean pread, boolean isCompaction, DataBlockEncoding expectedDataBlockEncoding, HFile.CachingBlockReader cachingBlockReader) Return the BlockWithScanInfo, a data structure which contains the Data HFileBlock with other scan info such as the key that starts the next HFileBlock.HFileBlockIndex.ByteArrayKeyBlockIndexReader.loadDataBlockWithScanInfo
(ExtendedCell key, HFileBlock currentBlock, boolean cacheBlocks, boolean pread, boolean isCompaction, DataBlockEncoding expectedDataBlockEncoding, HFile.CachingBlockReader cachingBlockReader) HFileBlockIndex.CellBasedKeyBlockIndexReader.loadDataBlockWithScanInfo
(ExtendedCell key, HFileBlock currentBlock, boolean cacheBlocks, boolean pread, boolean isCompaction, DataBlockEncoding expectedDataBlockEncoding, HFile.CachingBlockReader cachingBlockReader) HFileBlockIndex.CellBasedKeyBlockIndexReaderV2.loadDataBlockWithScanInfo
(ExtendedCell key, HFileBlock currentBlock, boolean cacheBlocks, boolean pread, boolean isCompaction, DataBlockEncoding expectedDataBlockEncoding, HFile.CachingBlockReader cachingBlockReader) HFileIndexBlockEncoder.EncodedSeeker.loadDataBlockWithScanInfo
(ExtendedCell key, HFileBlock currentBlock, boolean cacheBlocks, boolean pread, boolean isCompaction, DataBlockEncoding expectedDataBlockEncoding, HFile.CachingBlockReader cachingBlockReader) NoOpIndexBlockEncoder.NoOpEncodedSeeker.loadDataBlockWithScanInfo
(ExtendedCell key, HFileBlock currentBlock, boolean cacheBlocks, boolean pread, boolean isCompaction, DataBlockEncoding expectedDataBlockEncoding, HFile.CachingBlockReader cachingBlockReader) void
HFileBlockIndex.BlockIndexReader.readMultiLevelIndexRoot
(HFileBlock blk, int numEntries) Read the root-level metadata of a multi-level block index.void
HFileBlockIndex.CellBasedKeyBlockIndexReaderV2.readMultiLevelIndexRoot
(HFileBlock blk, int numEntries) HFileBlockIndex.BlockIndexReader.readRootIndex
(HFileBlock blk, int numEntries) Read in the root-level index from the given input stream.private DataInputStream
NoOpIndexBlockEncoder.NoOpEncodedSeeker.readRootIndex
(HFileBlock blk, int numEntries) protected void
HFileReaderImpl.HFileScannerImpl.releaseIfNotCurBlock
(HFileBlock block) The curBlock will be released by shipping or close method, so only need to consider releasing the block, which was read from HFile before and not referenced by curBlock.HFileBlockIndex.BlockIndexReader.seekToDataBlock
(ExtendedCell key, HFileBlock currentBlock, boolean cacheBlocks, boolean pread, boolean isCompaction, DataBlockEncoding expectedDataBlockEncoding, HFile.CachingBlockReader cachingBlockReader) Return the data block which contains this key.private static HFileBlock
HFileBlock.shallowClone
(HFileBlock blk, ByteBuff newBuf) (package private) void
HFileReaderImpl.HFileScannerImpl.updateCurrBlockRef
(HFileBlock block) protected void
HFileReaderImpl.EncodedScanner.updateCurrentBlock
(HFileBlock newBlock) Updates the current block to be the givenHFileBlock
.protected void
HFileReaderImpl.HFileScannerImpl.updateCurrentBlock
(HFileBlock newBlock) Updates the current block to be the givenHFileBlock
.private void
HFileReaderImpl.validateBlockType
(HFileBlock block, BlockType expectedBlockType) Compares the actual type of a block retrieved from cache or disk with its expected type and throws an exception in case of a mismatch.ModifierConstructorDescriptionBlockWithScanInfo
(HFileBlock hFileBlock, ExtendedCell nextIndexedKey) -
Uses of HFileBlock in org.apache.hadoop.hbase.io.hfile.bucket