Package org.apache.hadoop.hbase.io.hfile
Class TestLruAdaptiveBlockCache
java.lang.Object
org.apache.hadoop.hbase.io.hfile.TestLruAdaptiveBlockCache
Tests the concurrent LruAdaptiveBlockCache.
 
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 SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static final org.apache.hadoop.conf.Configurationprivate static final org.slf4j.Logger
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate longcalculateBlockSize(long maxSize, int numBlocks) private longcalculateBlockSizeDefault(long maxSize, int numBlocks) private TestLruAdaptiveBlockCache.CachedItem[]generateFixedBlocks(int numBlocks, int size, String pfx) private TestLruAdaptiveBlockCache.CachedItem[]generateFixedBlocks(int numBlocks, long size, String pfx) private TestLruAdaptiveBlockCache.CachedItem[]generateRandomBlocks(int numBlocks, long maxSize) voidvoidvoidvoidvoidvoidvoidvoidvoidvoid(package private) static voidtestMultiThreadGetAndEvictBlockInternal(org.apache.hadoop.hbase.io.hfile.BlockCache cache) voidvoidvoidvoidvoidtestSkipCacheDataBlocksInteral(int heavyEvictionCountLimit) 
- 
Field Details- 
CLASS_RULE
- 
LOG
- 
CONF
 
- 
- 
Constructor Details- 
TestLruAdaptiveBlockCachepublic TestLruAdaptiveBlockCache()
 
- 
- 
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
- 
generateFixedBlocksprivate TestLruAdaptiveBlockCache.CachedItem[] generateFixedBlocks(int numBlocks, int size, String pfx) 
- 
generateFixedBlocksprivate TestLruAdaptiveBlockCache.CachedItem[] generateFixedBlocks(int numBlocks, long size, String pfx) 
- 
generateRandomBlocks
- 
calculateBlockSize
- 
calculateBlockSizeDefault
- 
testMultiThreadGetAndEvictBlockInternalstatic void testMultiThreadGetAndEvictBlockInternal(org.apache.hadoop.hbase.io.hfile.BlockCache cache) throws Exception - Throws:
- Exception
 
- 
testMultiThreadGetAndEvictBlock- Throws:
- Exception
 
- 
testSkipCacheDataBlocksInteral- Throws:
- Exception
 
- 
testSkipCacheDataBlocks- Throws:
- Exception
 
 
-