public class TestLruBlockCache extends Object
Tests will ensure it grows and shrinks in size properly, evictions run when they're supposed to and do what they should, and that cached blocks are accessible when expected to be.
| Modifier and Type | Class and Description |
|---|---|
private static class |
TestLruBlockCache.CachedItem |
| Modifier and Type | Field and Description |
|---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static org.apache.hadoop.conf.Configuration |
CONF |
private static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
TestLruBlockCache() |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final org.apache.hadoop.conf.Configuration CONF
public TestLruBlockCache()
public void testCacheEvictionThreadSafe() throws Exception
Exceptionpublic void testBackgroundEvictionThread() throws Exception
Exceptionpublic void testCacheSimple() throws Exception
Exceptionpublic void testCacheEvictionSimple() throws Exception
Exceptionpublic void testCacheEvictionTwoPriorities() throws Exception
Exceptionpublic void testCacheEvictionThreePriorities() throws Exception
Exceptionpublic void testCacheEvictionInMemoryForceMode() throws Exception
Exceptionpublic void testScanResistance() throws Exception
Exceptionpublic void testMaxBlockSize() throws Exception
Exceptionpublic void testResizeBlockCache() throws Exception
Exceptionpublic void testPastNPeriodsMetrics() throws Exception
Exceptionpublic void testCacheBlockNextBlockMetadataMissing()
private TestLruBlockCache.CachedItem[] generateFixedBlocks(int numBlocks, int size, String pfx)
private TestLruBlockCache.CachedItem[] generateFixedBlocks(int numBlocks, long size, String pfx)
private TestLruBlockCache.CachedItem[] generateRandomBlocks(int numBlocks, long maxSize)
private long calculateBlockSize(long maxSize, int numBlocks)
private long calculateBlockSizeDefault(long maxSize, int numBlocks)
static void testMultiThreadGetAndEvictBlockInternal(org.apache.hadoop.hbase.io.hfile.BlockCache cache) throws Exception
Exceptionpublic void testMultiThreadGetAndEvictBlock() throws Exception
ExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.