@InterfaceAudience.Private public class HeapMemoryManager extends Object
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.Modifier and Type | Class and Description |
---|---|
static interface |
HeapMemoryManager.HeapMemoryTuneObserver
Every class that wants to observe heap memory tune actions must implement this interface.
|
private class |
HeapMemoryManager.HeapMemoryTunerChore |
static class |
HeapMemoryManager.TunerContext
POJO to pass all the relevant information required to do the heap memory tuning.
|
static class |
HeapMemoryManager.TunerResult
POJO which holds the result of memory tuning done by HeapMemoryTuner implementation.
|
Constructor and Description |
---|
HeapMemoryManager(BlockCache blockCache,
FlushRequester memStoreFlusher,
Server server,
RegionServerAccounting regionServerAccounting) |
Modifier and Type | Method and Description |
---|---|
private boolean |
doInit(org.apache.hadoop.conf.Configuration conf) |
float |
getHeapOccupancyPercent()
Returns heap occupancy percentage, 0 <= n <= 1.
|
(package private) boolean |
isTunerOn() |
void |
registerTuneObserver(HeapMemoryManager.HeapMemoryTuneObserver observer) |
void |
start(ChoreService service) |
void |
stop() |
private ResizableBlockCache |
toResizableBlockCache(BlockCache blockCache) |
private static final org.slf4j.Logger LOG
private static final int CONVERT_TO_PERCENTAGE
private static final int CLUSTER_MINIMUM_MEMORY_THRESHOLD
public static final String BLOCK_CACHE_SIZE_MAX_RANGE_KEY
public static final String BLOCK_CACHE_SIZE_MIN_RANGE_KEY
public static final String MEMSTORE_SIZE_MAX_RANGE_KEY
public static final String MEMSTORE_SIZE_MIN_RANGE_KEY
public static final String HBASE_RS_HEAP_MEMORY_TUNER_PERIOD
public static final int HBASE_RS_HEAP_MEMORY_TUNER_DEFAULT_PERIOD
public static final String HBASE_RS_HEAP_MEMORY_TUNER_CLASS
public static final float HEAP_OCCUPANCY_ERROR_VALUE
private float globalMemStorePercent
private float globalMemStorePercentMinRange
private float globalMemStorePercentMaxRange
private float blockCachePercent
private float blockCachePercentMinRange
private float blockCachePercentMaxRange
private float heapOccupancyPercent
private final ResizableBlockCache blockCache
private final FlushRequester memStoreFlusher
private final RegionServerAccounting regionServerAccounting
private HeapMemoryManager.HeapMemoryTunerChore heapMemTunerChore
private final boolean tunerOn
private final int defaultChorePeriod
private final float heapOccupancyLowWatermark
private final long maxHeapSize
private MetricsHeapMemoryManager metricsHeapMemoryManager
private List<HeapMemoryManager.HeapMemoryTuneObserver> tuneObservers
HeapMemoryManager(BlockCache blockCache, FlushRequester memStoreFlusher, Server server, RegionServerAccounting regionServerAccounting)
private ResizableBlockCache toResizableBlockCache(BlockCache blockCache)
private boolean doInit(org.apache.hadoop.conf.Configuration conf)
public void start(ChoreService service)
public void stop()
public void registerTuneObserver(HeapMemoryManager.HeapMemoryTuneObserver observer)
boolean isTunerOn()
public float getHeapOccupancyPercent()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.