public class CacheTestUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CacheTestUtils.ByteArrayCacheable |
static class |
CacheTestUtils.HFileBlockPair |
| Constructor and Description |
|---|
CacheTestUtils() |
| Modifier and Type | Method and Description |
|---|---|
static CacheTestUtils.HFileBlockPair[] |
generateHFileBlocks(int blockSize,
int numBlocks) |
static void |
getBlockAndAssertEquals(BlockCache cache,
BlockCacheKey key,
Cacheable blockToCache,
ByteBuffer destBuffer,
ByteBuffer expectedBuffer) |
static void |
hammerEviction(BlockCache toBeTested,
int BlockSize,
int numThreads,
int numQueries) |
static void |
hammerSingleKey(BlockCache toBeTested,
int BlockSize,
int numThreads,
int numQueries) |
static void |
testCacheMultiThreaded(BlockCache toBeTested,
int blockSize,
int numThreads,
int numQueries,
double passingScore) |
static void |
testCacheSimple(BlockCache toBeTested,
int blockSize,
int numBlocks) |
static void |
testHeapSizeChanges(BlockCache toBeTested,
int blockSize)
Just checks if heapsize grows when something is cached, and gets smaller
when the same object is evicted
|
public CacheTestUtils()
public static void testHeapSizeChanges(BlockCache toBeTested, int blockSize)
public static void testCacheMultiThreaded(BlockCache toBeTested, int blockSize, int numThreads, int numQueries, double passingScore) throws Exception
Exceptionpublic static void testCacheSimple(BlockCache toBeTested, int blockSize, int numBlocks) throws Exception
Exceptionpublic static void hammerSingleKey(BlockCache toBeTested, int BlockSize, int numThreads, int numQueries) throws Exception
Exceptionpublic static void hammerEviction(BlockCache toBeTested, int BlockSize, int numThreads, int numQueries) throws Exception
Exceptionpublic static CacheTestUtils.HFileBlockPair[] generateHFileBlocks(int blockSize, int numBlocks)
public static void getBlockAndAssertEquals(BlockCache cache, BlockCacheKey key, Cacheable blockToCache, ByteBuffer destBuffer, ByteBuffer expectedBuffer)
Copyright © 2007–2019 Cloudera. All rights reserved.