Package org.apache.hadoop.hbase.io.hfile
Class TestLruBlockCache
java.lang.Object
org.apache.hadoop.hbase.io.hfile.TestLruBlockCache
Tests the concurrent LruBlockCache.
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.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static final org.apache.hadoop.conf.Configurationprivate static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate longcalculateBlockSize(long maxSize, int numBlocks) private longcalculateBlockSizeDefault(long maxSize, int numBlocks) 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) voidvoidvoidvoidvoidvoidvoidvoidvoidvoid(package private) static voidtestMultiThreadGetAndEvictBlockInternal(org.apache.hadoop.hbase.io.hfile.BlockCache cache) voidvoidvoid
-
Field Details
-
CLASS_RULE
-
LOG
-
CONF
-
-
Constructor Details
-
TestLruBlockCache
public TestLruBlockCache()
-
-
Method Details
-
testCacheEvictionThreadSafe
- Throws:
Exception
-
testBackgroundEvictionThread
- Throws:
Exception
-
testCacheSimple
- Throws:
Exception
-
testCacheEvictionSimple
- Throws:
Exception
-
testCacheEvictionTwoPriorities
- Throws:
Exception
-
testCacheEvictionThreePriorities
- Throws:
Exception
-
testCacheEvictionInMemoryForceMode
- Throws:
Exception
-
testScanResistance
- Throws:
Exception
-
testMaxBlockSize
- Throws:
Exception
-
testResizeBlockCache
- Throws:
Exception
-
testPastNPeriodsMetrics
- Throws:
Exception
-
testCacheBlockNextBlockMetadataMissing
-
generateFixedBlocks
-
generateFixedBlocks
-
generateRandomBlocks
-
calculateBlockSize
-
calculateBlockSizeDefault
-
testMultiThreadGetAndEvictBlockInternal
static void testMultiThreadGetAndEvictBlockInternal(org.apache.hadoop.hbase.io.hfile.BlockCache cache) throws Exception - Throws:
Exception
-
testMultiThreadGetAndEvictBlock
- Throws:
Exception
-