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
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static class(package private) static class(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate org.apache.hadoop.conf.Configurationprivate static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidbasicBlockCacheOps(org.apache.hadoop.hbase.io.hfile.BlockCache bc, org.apache.hadoop.hbase.io.hfile.CacheConfig cc, boolean doubling, boolean sizing) private voidvoidsetUp()voidAssert that when BUCKET_CACHE_COMBINED_KEY is false, the non-default, that we deploy LruBlockCache as L1 with a BucketCache for L2.voidvoidvoidvoidvoidvoidvoidAssert 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
-