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

    Fields
    Modifier and Type
    Field
    Description
    int
     
    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

    Constructors
    Constructor
    Description
    BlockReaderWrapper(org.apache.hadoop.hbase.io.hfile.HFileBlock.FSReader realReader)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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)
     
    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)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • BlockReaderWrapper

      public BlockReaderWrapper(org.apache.hadoop.hbase.io.hfile.HFileBlock.FSReader realReader)
  • 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 interface org.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 interface org.apache.hadoop.hbase.io.hfile.HFile.CachingBlockReader
      Throws:
      IOException