Interface ContainersMonitor
- All Superinterfaces:
AutoCloseable,Closeable,org.apache.hadoop.yarn.event.EventHandler<ContainersMonitorEvent>,ResourceView,org.apache.hadoop.service.Service
- All Known Implementing Classes:
ContainersMonitorImpl
public interface ContainersMonitor
extends org.apache.hadoop.service.Service, org.apache.hadoop.yarn.event.EventHandler<ContainersMonitorEvent>, ResourceView
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddecreaseResourceUtilization(ContainersMonitor containersMonitor, org.apache.hadoop.yarn.api.records.ResourceUtilization resourceUtil, org.apache.hadoop.yarn.api.records.Resource resource) Utility method to subtract aResourcefrom theResourceUtilization.org.apache.hadoop.yarn.api.records.ResourceUtilizationfloatstatic voidincreaseResourceUtilization(ContainersMonitor containersMonitor, org.apache.hadoop.yarn.api.records.ResourceUtilization resourceUtil, org.apache.hadoop.yarn.api.records.Resource resource) Utility method to add aResourceto theResourceUtilization.voidsetAllocatedResourcesForContainers(org.apache.hadoop.yarn.api.records.Resource resource) Set the allocated resources for containers.voidsubtractNodeResourcesFromResourceUtilization(org.apache.hadoop.yarn.api.records.ResourceUtilization resourceUtil) Methods inherited from interface org.apache.hadoop.yarn.event.EventHandler
handleMethods inherited from interface org.apache.hadoop.yarn.server.nodemanager.ResourceView
getPmemAllocatedForContainers, getVCoresAllocatedForContainers, getVmemAllocatedForContainers, isPmemCheckEnabled, isVmemCheckEnabledMethods inherited from interface org.apache.hadoop.service.Service
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, registerServiceListener, start, stop, unregisterServiceListener, waitForServiceToStop
-
Method Details
-
getContainersUtilization
org.apache.hadoop.yarn.api.records.ResourceUtilization getContainersUtilization() -
getVmemRatio
float getVmemRatio() -
subtractNodeResourcesFromResourceUtilization
void subtractNodeResourcesFromResourceUtilization(org.apache.hadoop.yarn.api.records.ResourceUtilization resourceUtil) -
increaseResourceUtilization
static void increaseResourceUtilization(ContainersMonitor containersMonitor, org.apache.hadoop.yarn.api.records.ResourceUtilization resourceUtil, org.apache.hadoop.yarn.api.records.Resource resource) Utility method to add aResourceto theResourceUtilization.- Parameters:
containersMonitor- Containers Monitor.resourceUtil- Resource Utilization.resource- Resource.
-
decreaseResourceUtilization
static void decreaseResourceUtilization(ContainersMonitor containersMonitor, org.apache.hadoop.yarn.api.records.ResourceUtilization resourceUtil, org.apache.hadoop.yarn.api.records.Resource resource) Utility method to subtract aResourcefrom theResourceUtilization.- Parameters:
containersMonitor- Containers Monitor.resourceUtil- Resource Utilization.resource- Resource.
-
setAllocatedResourcesForContainers
void setAllocatedResourcesForContainers(org.apache.hadoop.yarn.api.records.Resource resource) Set the allocated resources for containers.- Parameters:
resource- Resources allocated for the containers.
-