public class CacheTestUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CacheTestUtils.ByteArrayCacheable |
static class |
CacheTestUtils.HFileBlockPair |
Modifier and Type | Field and Description |
---|---|
private static boolean |
includesMemstoreTS |
Constructor and Description |
---|
CacheTestUtils() |
Modifier and Type | Method and Description |
---|---|
static CacheTestUtils.HFileBlockPair[] |
generateHFileBlocks(int blockSize,
int numBlocks) |
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) |
static void |
hammerSingleKey(org.apache.hadoop.hbase.io.hfile.BlockCache toBeTested,
int numThreads,
int numQueries) |
static void |
testCacheMultiThreaded(org.apache.hadoop.hbase.io.hfile.BlockCache toBeTested,
int blockSize,
int numThreads,
int numQueries,
double passingScore) |
static void |
testCacheSimple(org.apache.hadoop.hbase.io.hfile.BlockCache toBeTested,
int blockSize,
int numBlocks) |
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
|
private static final boolean includesMemstoreTS
public CacheTestUtils()
public static void testHeapSizeChanges(org.apache.hadoop.hbase.io.hfile.BlockCache toBeTested, int blockSize)
public static void testCacheMultiThreaded(org.apache.hadoop.hbase.io.hfile.BlockCache toBeTested, int blockSize, int numThreads, int numQueries, double passingScore) throws Exception
Exception
public static void testCacheSimple(org.apache.hadoop.hbase.io.hfile.BlockCache toBeTested, int blockSize, int numBlocks) throws Exception
Exception
public static void hammerSingleKey(org.apache.hadoop.hbase.io.hfile.BlockCache toBeTested, int numThreads, int numQueries) throws Exception
Exception
public static CacheTestUtils.HFileBlockPair[] generateHFileBlocks(int blockSize, int numBlocks)
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)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.