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 enum
Enum of all built in external block caches. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The target block size used by blockcache instances.static final String
static final String
Configuration key to cache block policy (Lru, TinyLfu, AdaptiveLRU, IndexOnlyLRU).static final String
The window period length in minutes for CacheStats rolling metrics.static final String
The total number of periods in the window.static final String
A comma-delimited array of values for use as bucket sizes.static final String
static final String
static final int
Default window period length in minutes.static final int
Default number of periods in the window.static final int
static final int
Defaults for Bucket cache(package private) static final String
Deprecated.private static final String
private static final boolean
private static final String
private static final org.slf4j.Logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockCache
createBlockCache
(org.apache.hadoop.conf.Configuration conf) static BlockCache
createBlockCache
(org.apache.hadoop.conf.Configuration conf, Map<String, HRegion> onlineRegions) private static BucketCache
createBucketCache
(org.apache.hadoop.conf.Configuration c, Map<String, HRegion> onlineRegions) private static BlockCache
createExternalBlockcache
(org.apache.hadoop.conf.Configuration c) private static FirstLevelBlockCache
createFirstLevelCache
(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_KEY
instead.- 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_KEY
instead.