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
Exception
public void testBackgroundEvictionThread() throws Exception
Exception
public void testCacheSimple() throws Exception
Exception
public void testCacheEvictionSimple() throws Exception
Exception
public void testCacheEvictionTwoPriorities() throws Exception
Exception
public void testCacheEvictionThreePriorities() throws Exception
Exception
public void testCacheEvictionInMemoryForceMode() throws Exception
Exception
public void testScanResistance() throws Exception
Exception
public void testMaxBlockSize() throws Exception
Exception
public void testResizeBlockCache() throws Exception
Exception
public void testPastNPeriodsMetrics() throws Exception
Exception
public 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
Exception
public void testMultiThreadGetAndEvictBlock() throws Exception
Exception
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.