Class HeapMemoryManager
java.lang.Object
org.apache.hadoop.hbase.regionserver.HeapMemoryManager
Manages tuning of Heap memory using
HeapMemoryTuner
. Most part of the heap memory is
split between Memstores and BlockCache. This manager helps in tuning sizes of both these
dynamically, as per the R/W load on the servers.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Every class that wants to observe heap memory tune actions must implement this interface.private class
static final class
POJO to pass all the relevant information required to do the heap memory tuning.static final class
POJO which holds the result of memory tuning done by HeapMemoryTuner implementation. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
private final ResizableBlockCache
private float
private float
private float
private static final int
private static final int
private final int
private float
private float
private float
static final String
static final int
static final String
static final float
private final float
private float
private static final org.slf4j.Logger
private final long
static final String
static final String
private final FlushRequester
private MetricsHeapMemoryManager
private final RegionServerAccounting
private final Server
private final boolean
-
Constructor Summary
ConstructorDescriptionHeapMemoryManager
(BlockCache blockCache, FlushRequester memStoreFlusher, Server server, RegionServerAccounting regionServerAccounting) -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
doInit
(org.apache.hadoop.conf.Configuration conf) float
Returns heap occupancy percentage, 0 <= n <= 1.(package private) boolean
void
void
start
(ChoreService service) void
stop()
private ResizableBlockCache
toResizableBlockCache
(BlockCache blockCache)
-
Field Details
-
LOG
-
CONVERT_TO_PERCENTAGE
- See Also:
-
CLUSTER_MINIMUM_MEMORY_THRESHOLD
- See Also:
-
BLOCK_CACHE_SIZE_MAX_RANGE_KEY
- See Also:
-
BLOCK_CACHE_SIZE_MIN_RANGE_KEY
- See Also:
-
MEMSTORE_SIZE_MAX_RANGE_KEY
- See Also:
-
MEMSTORE_SIZE_MIN_RANGE_KEY
- See Also:
-
HBASE_RS_HEAP_MEMORY_TUNER_PERIOD
- See Also:
-
HBASE_RS_HEAP_MEMORY_TUNER_DEFAULT_PERIOD
- See Also:
-
HBASE_RS_HEAP_MEMORY_TUNER_CLASS
- See Also:
-
HEAP_OCCUPANCY_ERROR_VALUE
- See Also:
-
globalMemStorePercent
-
globalMemStorePercentMinRange
-
globalMemStorePercentMaxRange
-
blockCachePercent
-
blockCachePercentMinRange
-
blockCachePercentMaxRange
-
heapOccupancyPercent
-
blockCache
-
memStoreFlusher
-
server
-
regionServerAccounting
-
heapMemTunerChore
-
tunerOn
-
defaultChorePeriod
-
heapOccupancyLowWatermark
-
maxHeapSize
-
metricsHeapMemoryManager
-
tuneObservers
-
-
Constructor Details
-
HeapMemoryManager
HeapMemoryManager(BlockCache blockCache, FlushRequester memStoreFlusher, Server server, RegionServerAccounting regionServerAccounting)
-
-
Method Details
-
toResizableBlockCache
-
doInit
-
start
-
stop
-
registerTuneObserver
-
isTunerOn
boolean isTunerOn() -
getHeapOccupancyPercent
Returns heap occupancy percentage, 0 <= n <= 1. or -0.0 for error asking JVM
-