public class ContainersMonitorImpl extends org.apache.hadoop.service.AbstractService implements ContainersMonitor
Modifier and Type | Class and Description |
---|---|
static class |
ContainersMonitorImpl.ContainerMetric
Identifies the type of container metric to be published.
|
static class |
ContainersMonitorImpl.ProcessTreeInfo |
ContainersMonitor.ContainerManagerUtils
Constructor and Description |
---|
ContainersMonitorImpl(ContainerExecutor exec,
org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher,
Context context) |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.yarn.api.records.ResourceUtilization |
getContainersUtilization() |
long |
getPmemAllocatedForContainers() |
long |
getVCoresAllocatedForContainers() |
long |
getVmemAllocatedForContainers() |
float |
getVmemRatio() |
void |
handle(ContainersMonitorEvent monitoringEvent) |
boolean |
isPmemCheckEnabled()
Is the total physical memory check enabled?
|
boolean |
isVmemCheckEnabled()
Is the total virtual memory check enabled?
|
protected void |
onChangeMonitoringContainerResource(ContainersMonitorEvent monitoringEvent,
org.apache.hadoop.yarn.api.records.ContainerId containerId) |
protected void |
onStartMonitoringContainer(ContainersMonitorEvent monitoringEvent,
org.apache.hadoop.yarn.api.records.ContainerId containerId) |
protected void |
onStopMonitoringContainer(ContainersMonitorEvent monitoringEvent,
org.apache.hadoop.yarn.api.records.ContainerId containerId) |
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
protected void |
serviceStart() |
protected void |
serviceStop() |
void |
setContainersUtilization(org.apache.hadoop.yarn.api.records.ResourceUtilization utilization) |
void |
subtractNodeResourcesFromResourceUtilization(org.apache.hadoop.yarn.api.records.ResourceUtilization resourceUtil) |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
protected final Context context
public ContainersMonitorImpl(ContainerExecutor exec, org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher, Context context)
protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
serviceInit
in class org.apache.hadoop.service.AbstractService
Exception
protected void serviceStart() throws Exception
serviceStart
in class org.apache.hadoop.service.AbstractService
Exception
protected void serviceStop() throws Exception
serviceStop
in class org.apache.hadoop.service.AbstractService
Exception
public long getVmemAllocatedForContainers()
getVmemAllocatedForContainers
in interface ResourceView
public boolean isPmemCheckEnabled()
isPmemCheckEnabled
in interface ResourceView
public long getPmemAllocatedForContainers()
getPmemAllocatedForContainers
in interface ResourceView
public long getVCoresAllocatedForContainers()
getVCoresAllocatedForContainers
in interface ResourceView
public boolean isVmemCheckEnabled()
isVmemCheckEnabled
in interface ResourceView
public org.apache.hadoop.yarn.api.records.ResourceUtilization getContainersUtilization()
getContainersUtilization
in interface ContainersMonitor
public void setContainersUtilization(org.apache.hadoop.yarn.api.records.ResourceUtilization utilization)
public void subtractNodeResourcesFromResourceUtilization(org.apache.hadoop.yarn.api.records.ResourceUtilization resourceUtil)
subtractNodeResourcesFromResourceUtilization
in interface ContainersMonitor
public float getVmemRatio()
getVmemRatio
in interface ContainersMonitor
public void handle(ContainersMonitorEvent monitoringEvent)
handle
in interface org.apache.hadoop.yarn.event.EventHandler<ContainersMonitorEvent>
protected void onChangeMonitoringContainerResource(ContainersMonitorEvent monitoringEvent, org.apache.hadoop.yarn.api.records.ContainerId containerId)
protected void onStopMonitoringContainer(ContainersMonitorEvent monitoringEvent, org.apache.hadoop.yarn.api.records.ContainerId containerId)
protected void onStartMonitoringContainer(ContainersMonitorEvent monitoringEvent, org.apache.hadoop.yarn.api.records.ContainerId containerId)
Copyright © 2018 Apache Software Foundation. All Rights Reserved.