@InterfaceAudience.Private public class HeapMemorySizeUtil extends Object
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_MEMSTORE_SIZE |
static float |
DEFAULT_MEMSTORE_SIZE_LOWER_LIMIT |
static String |
MEMSTORE_SIZE_KEY |
static String |
MEMSTORE_SIZE_LOWER_LIMIT_KEY |
static String |
MEMSTORE_SIZE_LOWER_LIMIT_OLD_KEY |
static String |
MEMSTORE_SIZE_OLD_KEY |
Constructor and Description |
---|
HeapMemorySizeUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
checkForClusterFreeMemoryLimit(Configuration conf)
Checks whether we have enough heap memory left out after portion for Memstore and Block cache.
|
static float |
getBlockCacheHeapPercent(Configuration conf)
Retrieve configured size for on heap block cache as percentage of total heap.
|
static float |
getGlobalMemStoreLowerMark(Configuration c,
float globalMemStorePercent)
Retrieve configured size for global memstore lower water mark as percentage of total heap.
|
static float |
getGlobalMemStorePercent(Configuration c,
boolean logInvalid)
Retrieve global memstore configured size as percentage of total heap.
|
static float |
getL2BlockCacheHeapPercent(Configuration conf) |
public static final String MEMSTORE_SIZE_KEY
public static final String MEMSTORE_SIZE_OLD_KEY
public static final String MEMSTORE_SIZE_LOWER_LIMIT_KEY
public static final String MEMSTORE_SIZE_LOWER_LIMIT_OLD_KEY
public static final float DEFAULT_MEMSTORE_SIZE
public static final float DEFAULT_MEMSTORE_SIZE_LOWER_LIMIT
public static void checkForClusterFreeMemoryLimit(Configuration conf)
conf
- public static float getGlobalMemStorePercent(Configuration c, boolean logInvalid)
c
- logInvalid
- public static float getGlobalMemStoreLowerMark(Configuration c, float globalMemStorePercent)
c
- globalMemStorePercent
- public static float getBlockCacheHeapPercent(Configuration conf)
conf
- public static float getL2BlockCacheHeapPercent(Configuration conf)
conf
-