java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.service.Service, org.apache.hadoop.yarn.event.EventHandler<ContainersMonitorEvent>, ContainersMonitor, ResourceViewpublic class ContainersMonitorImpl extends org.apache.hadoop.service.AbstractService implements ContainersMonitor
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ContainersMonitorImpl.ContainerMetric |
Type of container metric.
|
static class |
ContainersMonitorImpl.ProcessTreeInfo |
Encapsulates resource requirements of a process and its tree.
|
| Constructor | Description |
|---|---|
ContainersMonitorImpl(ContainerExecutor exec,
org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher,
Context context) |
| Modifier and Type | Method | Description |
|---|---|---|
org.apache.hadoop.yarn.api.records.ResourceUtilization |
getContainersUtilization() |
|
long |
getPmemAllocatedForContainers() |
Get physical memory allocated to the containers.
|
long |
getVCoresAllocatedForContainers() |
|
long |
getVmemAllocatedForContainers() |
Get virtual memory allocated to the containers.
|
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 |
serviceInit(org.apache.hadoop.conf.Configuration myConf) |
|
protected void |
serviceStart() |
|
protected void |
serviceStop() |
|
void |
setAllocatedResourcesForContainers(org.apache.hadoop.yarn.api.records.Resource resource) |
Set the allocated resources for containers.
|
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, waitForServiceToStoppublic ContainersMonitorImpl(ContainerExecutor exec, org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher, Context context)
protected void serviceInit(org.apache.hadoop.conf.Configuration myConf)
throws java.lang.Exception
serviceInit in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionprotected void serviceStart()
throws java.lang.Exception
serviceStart in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionprotected void serviceStop()
throws java.lang.Exception
serviceStop in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionpublic long getVmemAllocatedForContainers()
ResourceViewgetVmemAllocatedForContainers in interface ResourceViewpublic boolean isPmemCheckEnabled()
isPmemCheckEnabled in interface ResourceViewpublic long getPmemAllocatedForContainers()
ResourceViewgetPmemAllocatedForContainers in interface ResourceViewpublic long getVCoresAllocatedForContainers()
getVCoresAllocatedForContainers in interface ResourceViewpublic void setAllocatedResourcesForContainers(org.apache.hadoop.yarn.api.records.Resource resource)
ContainersMonitorsetAllocatedResourcesForContainers in interface ContainersMonitorresource - Resources allocated for the containers.public boolean isVmemCheckEnabled()
isVmemCheckEnabled in interface ResourceViewpublic org.apache.hadoop.yarn.api.records.ResourceUtilization getContainersUtilization()
getContainersUtilization in interface ContainersMonitorpublic void subtractNodeResourcesFromResourceUtilization(org.apache.hadoop.yarn.api.records.ResourceUtilization resourceUtil)
subtractNodeResourcesFromResourceUtilization in interface ContainersMonitorpublic float getVmemRatio()
getVmemRatio in interface ContainersMonitorpublic void handle(ContainersMonitorEvent monitoringEvent)
handle in interface org.apache.hadoop.yarn.event.EventHandler<ContainersMonitorEvent>Copyright © 2008–2025 Apache Software Foundation. All rights reserved.