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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static final org.apache.hadoop.conf.Configuration
private static final org.slf4j.Logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate long
calculateBlockSize
(long maxSize, int numBlocks) private long
calculateBlockSizeDefault
(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) void
void
void
void
void
void
void
void
void
void
(package private) static void
testMultiThreadGetAndEvictBlockInternal
(org.apache.hadoop.hbase.io.hfile.BlockCache cache) void
void
void
-
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
-