Package org.apache.hadoop.hbase.io.hfile
Class BlockCacheFactory
java.lang.Object
org.apache.hadoop.hbase.io.hfile.BlockCacheFactory
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static enumEnum of all built in external block caches. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe target block size used by blockcache instances.static final Stringstatic final StringConfiguration key to cache block policy (Lru, TinyLfu, AdaptiveLRU, IndexOnlyLRU).static final StringThe window period length in minutes for CacheStats rolling metrics.static final StringThe total number of periods in the window.static final StringA comma-delimited array of values for use as bucket sizes.static final Stringstatic final Stringstatic final intDefault window period length in minutes.static final intDefault number of periods in the window.static final intstatic final intDefaults for Bucket cache(package private) static final StringDeprecated.private static final Stringprivate static final booleanprivate static final Stringprivate static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockCachecreateBlockCache(org.apache.hadoop.conf.Configuration conf) static BlockCachecreateBlockCache(org.apache.hadoop.conf.Configuration conf, Map<String, HRegion> onlineRegions) private static BucketCachecreateBucketCache(org.apache.hadoop.conf.Configuration c, Map<String, HRegion> onlineRegions) private static BlockCachecreateExternalBlockcache(org.apache.hadoop.conf.Configuration c) private static FirstLevelBlockCachecreateFirstLevelCache(org.apache.hadoop.conf.Configuration c)
-
Field Details
-
LOG
-
BLOCKCACHE_POLICY_KEY
Configuration key to cache block policy (Lru, TinyLfu, AdaptiveLRU, IndexOnlyLRU).- See Also:
-
BLOCKCACHE_POLICY_DEFAULT
- See Also:
-
BUCKET_CACHE_WRITER_THREADS_KEY
- See Also:
-
BUCKET_CACHE_WRITER_QUEUE_KEY
- See Also:
-
BUCKET_CACHE_BUCKETS_KEY
A comma-delimited array of values for use as bucket sizes.- See Also:
-
DEFAULT_BUCKET_CACHE_WRITER_THREADS
Defaults for Bucket cache- See Also:
-
DEFAULT_BUCKET_CACHE_WRITER_QUEUE
- See Also:
-
BLOCKCACHE_BLOCKSIZE_KEY
The target block size used by blockcache instances. Defaults toHConstants.DEFAULT_BLOCKSIZE.- See Also:
-
EXTERNAL_BLOCKCACHE_KEY
- See Also:
-
EXTERNAL_BLOCKCACHE_DEFAULT
- See Also:
-
EXTERNAL_BLOCKCACHE_CLASS_KEY
- See Also:
-
DEPRECATED_BLOCKCACHE_BLOCKSIZE_KEY
Deprecated.useBLOCKCACHE_BLOCKSIZE_KEYinstead.- See Also:
-
BLOCKCACHE_STATS_PERIOD_MINUTES_KEY
The window period length in minutes for CacheStats rolling metrics.- See Also:
-
DEFAULT_BLOCKCACHE_STATS_PERIOD_MINUTES
Default window period length in minutes.- See Also:
-
BLOCKCACHE_STATS_PERIODS
The total number of periods in the window.- See Also:
-
DEFAULT_BLOCKCACHE_STATS_PERIODS
Default number of periods in the window. We define 12 periods of 5 minutes to give an hourly split of 5 minutes periods.- See Also:
-
-
Constructor Details
-
BlockCacheFactory
private BlockCacheFactory()
-
-
Method Details
-
createBlockCache
public static BlockCache createBlockCache(org.apache.hadoop.conf.Configuration conf, Map<String, HRegion> onlineRegions) -
createBlockCache
-
createFirstLevelCache
-
createExternalBlockcache
-
createBucketCache
private static BucketCache createBucketCache(org.apache.hadoop.conf.Configuration c, Map<String, HRegion> onlineRegions)
-
BLOCKCACHE_BLOCKSIZE_KEYinstead.