Class CGroupsV2MemoryResourceHandlerImpl
java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.resources.AbstractCGroupsMemoryResourceHandler
org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.resources.CGroupsV2MemoryResourceHandlerImpl
- All Implemented Interfaces:
MemoryResourceHandler,ResourceHandler
Handler class to handle the memory controller. YARN already ships a
physical memory monitor in Java but it isn't as
good as CGroups. This handler sets the soft and hard memory limits. The soft
limit is set to 90% of the hard limit.
-
Field Summary
Fields inherited from class org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.resources.AbstractCGroupsMemoryResourceHandler
MEMORY, OPPORTUNISTIC_SOFT_LIMIT -
Method Summary
Modifier and TypeMethodDescriptionprotected voidupdateGuaranteedMemoryLimits(String cgroupId, long containerSoftLimit) protected voidupdateMemoryHardLimit(String cgroupId, long containerHardLimit) protected voidupdateOpportunisticMemoryLimits(String cgroupId) Methods inherited from class org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.resources.AbstractCGroupsMemoryResourceHandler
bootstrap, getCGroupsHandler, postComplete, preStart, reacquireContainer, teardown, toString, updateContainer
-
Method Details
-
updateMemoryHardLimit
protected void updateMemoryHardLimit(String cgroupId, long containerHardLimit) throws ResourceHandlerException - Specified by:
updateMemoryHardLimitin classAbstractCGroupsMemoryResourceHandler- Throws:
ResourceHandlerException
-
updateOpportunisticMemoryLimits
- Specified by:
updateOpportunisticMemoryLimitsin classAbstractCGroupsMemoryResourceHandler- Throws:
ResourceHandlerException
-
updateGuaranteedMemoryLimits
protected void updateGuaranteedMemoryLimits(String cgroupId, long containerSoftLimit) throws ResourceHandlerException - Specified by:
updateGuaranteedMemoryLimitsin classAbstractCGroupsMemoryResourceHandler- Throws:
ResourceHandlerException
-