Class CacheTestUtils

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

public class CacheTestUtils extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • testHeapSizeChanges

      public static void testHeapSizeChanges(org.apache.hadoop.hbase.io.hfile.BlockCache toBeTested, int blockSize)
      Just checks if heapsize grows when something is cached, and gets smaller when the same object is evicted
    • testCacheMultiThreaded

      public static void testCacheMultiThreaded(org.apache.hadoop.hbase.io.hfile.BlockCache toBeTested, int blockSize, int numThreads, int numQueries, double passingScore) throws Exception
      Throws:
      Exception
    • testCacheSimple

      public static void testCacheSimple(org.apache.hadoop.hbase.io.hfile.BlockCache toBeTested, int blockSize, int numBlocks) throws Exception
      Throws:
      Exception
    • hammerSingleKey

      public static void hammerSingleKey(org.apache.hadoop.hbase.io.hfile.BlockCache toBeTested, int numThreads, int numQueries) throws Exception
      Throws:
      Exception
    • generateHFileBlocks

      public static CacheTestUtils.HFileBlockPair[] generateHFileBlocks(int blockSize, int numBlocks)
    • getBlockAndAssertEquals

      public static void getBlockAndAssertEquals(org.apache.hadoop.hbase.io.hfile.BlockCache cache, org.apache.hadoop.hbase.io.hfile.BlockCacheKey key, org.apache.hadoop.hbase.io.hfile.Cacheable blockToCache, ByteBuffer destBuffer, ByteBuffer expectedBuffer)