Package org.apache.hadoop.hbase.io.hfile
Class TestCacheConfig
java.lang.Object
org.apache.hadoop.hbase.io.hfile.TestCacheConfig
Tests that
CacheConfig
does as expected.-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
(package private) static class
(package private) static class
(package private) static class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private org.apache.hadoop.conf.Configuration
private static final org.slf4j.Logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) void
basicBlockCacheOps
(org.apache.hadoop.hbase.io.hfile.BlockCache bc, org.apache.hadoop.hbase.io.hfile.CacheConfig cc, boolean doubling, boolean sizing) private void
void
setUp()
void
Assert that when BUCKET_CACHE_COMBINED_KEY is false, the non-default, that we deploy LruBlockCache as L1 with a BucketCache for L2.void
void
void
void
void
void
void
Assert that the caches are deployed with CombinedBlockCache and of the appropriate sizes.
-
Field Details
-
CLASS_RULE
-
LOG
-
conf
-
-
Constructor Details
-
TestCacheConfig
public TestCacheConfig()
-
-
Method Details
-
setUp
- Throws:
Exception
-
basicBlockCacheOps
void basicBlockCacheOps(org.apache.hadoop.hbase.io.hfile.BlockCache bc, org.apache.hadoop.hbase.io.hfile.CacheConfig cc, boolean doubling, boolean sizing) - Parameters:
bc
- The block cache instance.cc
- Cache config.doubling
- If true, addition of element ups counter by 2, not 1, because element added to onheap and offheap caches.sizing
- True if we should run sizing test (doesn't always apply).
-
testDisableCacheDataBlock
- Throws:
IOException
-
testCacheConfigDefaultLRUBlockCache
-
testOffHeapBucketCacheConfig
Assert that the caches are deployed with CombinedBlockCache and of the appropriate sizes. -
testFileBucketCacheConfig
- Throws:
IOException
-
doBucketCacheConfigTest
-
testBucketCacheConfigL1L2Setup
Assert that when BUCKET_CACHE_COMBINED_KEY is false, the non-default, that we deploy LruBlockCache as L1 with a BucketCache for L2. -
testL2CacheWithInvalidBucketSize
-
testIndexOnlyLruBlockCache
-
testGetOnHeapCacheSize
-