Package org.apache.hadoop.hbase.io.hfile
Class CacheTestUtils
java.lang.Object
org.apache.hadoop.hbase.io.hfile.CacheTestUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CacheTestUtils.HFileBlockPair[]generateBlocksForPath(int blockSize, int numBlocks, org.apache.hadoop.fs.Path path) static CacheTestUtils.HFileBlockPair[]generateBlocksForPath(int blockSize, int numBlocks, org.apache.hadoop.fs.Path path, boolean encoded) static CacheTestUtils.HFileBlockPair[]generateHFileBlocks(int blockSize, int numBlocks) static voidgetBlockAndAssertEquals(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) static voidhammerSingleKey(org.apache.hadoop.hbase.io.hfile.BlockCache toBeTested, int numThreads, int numQueries) static voidtestCacheMultiThreaded(org.apache.hadoop.hbase.io.hfile.BlockCache toBeTested, int blockSize, int numThreads, int numQueries, double passingScore) static voidtestCacheSimple(org.apache.hadoop.hbase.io.hfile.BlockCache toBeTested, int blockSize, int numBlocks) static voidtestConvertToJSON(org.apache.hadoop.hbase.io.hfile.BlockCache toBeTested) static voidtestHeapSizeChanges(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
-
Field Details
-
includesMemstoreTS
- See Also:
-
-
Constructor Details
-
CacheTestUtils
public CacheTestUtils()
-
-
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
-
generateBlocksForPath
public static CacheTestUtils.HFileBlockPair[] generateBlocksForPath(int blockSize, int numBlocks, org.apache.hadoop.fs.Path path, boolean encoded) -
generateBlocksForPath
public static CacheTestUtils.HFileBlockPair[] generateBlocksForPath(int blockSize, int numBlocks, org.apache.hadoop.fs.Path path) -
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) -
testConvertToJSON
-