Class TestLazyDataBlockDecompression

java.lang.Object
org.apache.hadoop.hbase.io.hfile.TestLazyDataBlockDecompression

@Tag("org.apache.hadoop.hbase.testclassification.IOTests") @Tag("org.apache.hadoop.hbase.testclassification.SmallTests") public class TestLazyDataBlockDecompression extends Object
A kind of integration test at the intersection of HFileBlock, CacheConfig, and LruBlockCache.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final boolean
     
    private org.apache.hadoop.fs.FileSystem
     
    private static final org.slf4j.Logger
     
    private static final Random
     
    private static final HBaseTestingUtil
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    TestLazyDataBlockDecompression(boolean cacheOnWrite)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static void
    cacheBlocks(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConfig, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.hbase.io.hfile.HFileContext cxt)
    Read all blocks from path to populate blockCache.
    static Stream<org.junit.jupiter.params.provider.Arguments>
     
    void
     
    void
     
    void
     
    private static void
    writeHFile(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.io.hfile.CacheConfig cc, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.hbase.io.hfile.HFileContext cxt, int entryCount)
    Write entryCount random keyvalues to a new HFile at path.

    Methods inherited from class java.lang.Object

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

  • Constructor Details

  • Method Details

    • parameters

      public static Stream<org.junit.jupiter.params.provider.Arguments> parameters()
    • setUp

      @BeforeEach public void setUp() throws IOException
      Throws:
      IOException
    • tearDown

      @AfterEach public void tearDown()
    • writeHFile

      private static void writeHFile(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.io.hfile.CacheConfig cc, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.hbase.io.hfile.HFileContext cxt, int entryCount) throws IOException
      Write entryCount random keyvalues to a new HFile at path. Returns the row bytes of the KeyValues written, in the order they were written.
      Throws:
      IOException
    • cacheBlocks

      private static void cacheBlocks(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConfig, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.hbase.io.hfile.HFileContext cxt) throws IOException
      Read all blocks from path to populate blockCache.
      Throws:
      IOException
    • testCompressionIncreasesEffectiveBlockCacheSize

      @TestTemplate public void testCompressionIncreasesEffectiveBlockCacheSize() throws Exception
      Throws:
      Exception