@InterfaceAudience.Private public class HeapMemorySizeUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
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 |
| 构造器和说明 |
|---|
HeapMemorySizeUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
checkForClusterFreeMemoryLimit(org.apache.hadoop.conf.Configuration conf)
Checks whether we have enough heap memory left out after portion for Memstore and Block cache.
|
static float |
getBlockCacheHeapPercent(org.apache.hadoop.conf.Configuration conf)
Retrieve configured size for on heap block cache as percentage of total heap.
|
static long |
getBucketCacheSize(org.apache.hadoop.conf.Configuration conf) |
static float |
getGlobalMemStoreLowerMark(org.apache.hadoop.conf.Configuration conf,
float globalMemStorePercent)
Retrieve configured size for global memstore lower water mark as fraction of global memstore
size.
|
static float |
getGlobalMemStorePercent(org.apache.hadoop.conf.Configuration c,
boolean logInvalid)
Retrieve global memstore configured size as percentage of total heap.
|
static float |
getL2BlockCacheHeapPercent(org.apache.hadoop.conf.Configuration conf) |
static long |
getLruCacheSize(org.apache.hadoop.conf.Configuration conf) |
static MemoryUsage |
safeGetHeapMemoryUsage()
Return JVM memory statistics while properly handling runtime exceptions from the JVM.
|
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 MemoryUsage safeGetHeapMemoryUsage()
MemoryUsagepublic static void checkForClusterFreeMemoryLimit(org.apache.hadoop.conf.Configuration conf)
conf - public static float getGlobalMemStorePercent(org.apache.hadoop.conf.Configuration c,
boolean logInvalid)
c - logInvalid - public static float getGlobalMemStoreLowerMark(org.apache.hadoop.conf.Configuration conf,
float globalMemStorePercent)
public static float getBlockCacheHeapPercent(org.apache.hadoop.conf.Configuration conf)
conf - public static float getL2BlockCacheHeapPercent(org.apache.hadoop.conf.Configuration conf)
conf - public static long getLruCacheSize(org.apache.hadoop.conf.Configuration conf)
conf - used to read cache configsIllegalArgumentException - if HFILE_BLOCK_CACHE_SIZE_KEY is > 1.0public static long getBucketCacheSize(org.apache.hadoop.conf.Configuration conf)
conf - used to read config for bucket cache size. (< 1 is treated as % and > is treated as MiB)Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.