@InterfaceAudience.Private @Metrics(context="container") public class ContainerMetrics extends Object implements org.apache.hadoop.metrics2.MetricsSource
Modifier and Type | Field and Description |
---|---|
org.apache.hadoop.metrics2.lib.MutableStat |
cpuCoreUsagePercent |
org.apache.hadoop.metrics2.lib.MutableGaugeInt |
cpuVcoreLimit |
org.apache.hadoop.metrics2.lib.MutableStat |
milliVcoresUsed |
static String |
PMEM_LIMIT_METRIC_NAME |
static String |
PMEM_USAGE_METRIC_NAME |
org.apache.hadoop.metrics2.lib.MutableGaugeInt |
pMemLimitMbs |
org.apache.hadoop.metrics2.lib.MutableStat |
pMemMBsStat |
static org.apache.hadoop.metrics2.MetricsInfo |
PROCESSID_INFO |
protected static Map<org.apache.hadoop.yarn.api.records.ContainerId,ContainerMetrics> |
usageMetrics
Simple metrics cache to help prevent re-registrations.
|
static String |
VCORE_LIMIT_METRIC_NAME |
static String |
VMEM_LIMIT_METRIC_NAME |
org.apache.hadoop.metrics2.lib.MutableGaugeInt |
vMemLimitMbs |
Modifier and Type | Method and Description |
---|---|
void |
finished() |
static ContainerMetrics |
forContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId,
long flushPeriodMs) |
void |
getMetrics(org.apache.hadoop.metrics2.MetricsCollector collector,
boolean all) |
void |
recordCpuUsage(int totalPhysicalCpuPercent,
int milliVcoresUsed) |
void |
recordMemoryUsage(int memoryMBs) |
void |
recordProcessId(String processId) |
void |
recordResourceLimit(int vmemLimit,
int pmemLimit,
int cpuVcores) |
public static final String PMEM_LIMIT_METRIC_NAME
public static final String VMEM_LIMIT_METRIC_NAME
public static final String VCORE_LIMIT_METRIC_NAME
public static final String PMEM_USAGE_METRIC_NAME
@Metric public org.apache.hadoop.metrics2.lib.MutableStat pMemMBsStat
@Metric public org.apache.hadoop.metrics2.lib.MutableStat cpuCoreUsagePercent
@Metric public org.apache.hadoop.metrics2.lib.MutableStat milliVcoresUsed
@Metric public org.apache.hadoop.metrics2.lib.MutableGaugeInt pMemLimitMbs
@Metric public org.apache.hadoop.metrics2.lib.MutableGaugeInt vMemLimitMbs
@Metric public org.apache.hadoop.metrics2.lib.MutableGaugeInt cpuVcoreLimit
public static final org.apache.hadoop.metrics2.MetricsInfo PROCESSID_INFO
protected static final Map<org.apache.hadoop.yarn.api.records.ContainerId,ContainerMetrics> usageMetrics
public static ContainerMetrics forContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId, long flushPeriodMs)
public void getMetrics(org.apache.hadoop.metrics2.MetricsCollector collector, boolean all)
getMetrics
in interface org.apache.hadoop.metrics2.MetricsSource
public void finished()
public void recordMemoryUsage(int memoryMBs)
public void recordCpuUsage(int totalPhysicalCpuPercent, int milliVcoresUsed)
public void recordProcessId(String processId)
public void recordResourceLimit(int vmemLimit, int pmemLimit, int cpuVcores)
Copyright © 2017 Apache Software Foundation. All Rights Reserved.