Package org.apache.hadoop.hbase.io.hfile
Class TestHFileBlockIndex.BlockReaderWrapper
java.lang.Object
org.apache.hadoop.hbase.io.hfile.TestHFileBlockIndex.BlockReaderWrapper
- All Implemented Interfaces:
org.apache.hadoop.hbase.io.hfile.HFile.CachingBlockReader
- Enclosing class:
- TestHFileBlockIndex
private static class TestHFileBlockIndex.BlockReaderWrapper
extends Object
implements org.apache.hadoop.hbase.io.hfile.HFile.CachingBlockReader
A wrapper around a block reader which only caches the results of the last operation. Not
thread-safe.
-
Field Summary
Modifier and TypeFieldDescriptionint
int
private org.apache.hadoop.hbase.io.hfile.HFileBlock
private long
private long
private boolean
private org.apache.hadoop.hbase.io.hfile.HFileBlock.FSReader
-
Constructor Summary
ConstructorDescriptionBlockReaderWrapper
(org.apache.hadoop.hbase.io.hfile.HFileBlock.FSReader realReader) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hbase.io.hfile.HFileBlock
readBlock
(long offset, long onDiskSize, boolean cacheBlock, boolean pread, boolean isCompaction, boolean updateCacheMetrics, org.apache.hadoop.hbase.io.hfile.BlockType expectedBlockType, org.apache.hadoop.hbase.io.encoding.DataBlockEncoding expectedDataBlockEncoding) org.apache.hadoop.hbase.io.hfile.HFileBlock
readBlock
(long offset, long onDiskSize, boolean cacheBlock, boolean pread, boolean isCompaction, boolean updateCacheMetrics, org.apache.hadoop.hbase.io.hfile.BlockType expectedBlockType, org.apache.hadoop.hbase.io.encoding.DataBlockEncoding expectedDataBlockEncoding, boolean cacheOnly)
-
Field Details
-
realReader
-
prevOffset
-
prevOnDiskSize
-
prevPread
-
prevBlock
-
hitCount
-
missCount
-
-
Constructor Details
-
BlockReaderWrapper
-
-
Method Details
-
readBlock
public org.apache.hadoop.hbase.io.hfile.HFileBlock readBlock(long offset, long onDiskSize, boolean cacheBlock, boolean pread, boolean isCompaction, boolean updateCacheMetrics, org.apache.hadoop.hbase.io.hfile.BlockType expectedBlockType, org.apache.hadoop.hbase.io.encoding.DataBlockEncoding expectedDataBlockEncoding) throws IOException - Specified by:
readBlock
in interfaceorg.apache.hadoop.hbase.io.hfile.HFile.CachingBlockReader
- Throws:
IOException
-
readBlock
public org.apache.hadoop.hbase.io.hfile.HFileBlock readBlock(long offset, long onDiskSize, boolean cacheBlock, boolean pread, boolean isCompaction, boolean updateCacheMetrics, org.apache.hadoop.hbase.io.hfile.BlockType expectedBlockType, org.apache.hadoop.hbase.io.encoding.DataBlockEncoding expectedDataBlockEncoding, boolean cacheOnly) throws IOException - Specified by:
readBlock
in interfaceorg.apache.hadoop.hbase.io.hfile.HFile.CachingBlockReader
- Throws:
IOException
-