Class CGroupsBlkioResourceHandlerImpl
java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.resources.CGroupsBlkioResourceHandlerImpl
- All Implemented Interfaces:
DiskResourceHandler,ResourceHandler
@Private
@Unstable
public class CGroupsBlkioResourceHandlerImpl
extends Object
implements DiskResourceHandler
Handler class to handle the blkio controller. Currently it splits resources
evenly across all containers. Once we have scheduling sorted out, we can
modify the function to represent the disk resources allocated.
-
Method Summary
Modifier and TypeMethodDescriptionbootstrap(org.apache.hadoop.conf.Configuration configuration) Bootstrap resource susbsystem.postComplete(org.apache.hadoop.yarn.api.records.ContainerId containerId) Perform any tasks necessary after container completion.Prepare a resource environment for container launchreacquireContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId) Require state for container that was already launchedteardown()Teardown environment for resource subsystem if requested.toString()updateContainer(Container container) Update state for container that was already launched
-
Method Details
-
bootstrap
public List<PrivilegedOperation> bootstrap(org.apache.hadoop.conf.Configuration configuration) throws ResourceHandlerException Description copied from interface:ResourceHandlerBootstrap resource susbsystem.- Specified by:
bootstrapin interfaceResourceHandler- Returns:
- (possibly empty) list of operations that require elevated privileges
- Throws:
ResourceHandlerException
-
preStart
Description copied from interface:ResourceHandlerPrepare a resource environment for container launch- Specified by:
preStartin interfaceResourceHandler- Parameters:
container- Container being launched- Returns:
- (possibly empty) list of operations that require elevated privileges e.g a) create a custom cgroup b) add pid for container to tasks file for a cgroup.
- Throws:
ResourceHandlerException
-
reacquireContainer
public List<PrivilegedOperation> reacquireContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId) throws ResourceHandlerException Description copied from interface:ResourceHandlerRequire state for container that was already launched- Specified by:
reacquireContainerin interfaceResourceHandler- Parameters:
containerId- id of the container being reacquired.- Returns:
- (possibly empty) list of operations that require elevated privileges
- Throws:
ResourceHandlerException
-
updateContainer
public List<PrivilegedOperation> updateContainer(Container container) throws ResourceHandlerException Description copied from interface:ResourceHandlerUpdate state for container that was already launched- Specified by:
updateContainerin interfaceResourceHandler- Parameters:
container- the container being updated.- Returns:
- (possibly empty) list of operations that require elevated privileges
- Throws:
ResourceHandlerException
-
postComplete
public List<PrivilegedOperation> postComplete(org.apache.hadoop.yarn.api.records.ContainerId containerId) throws ResourceHandlerException Description copied from interface:ResourceHandlerPerform any tasks necessary after container completion.- Specified by:
postCompletein interfaceResourceHandler- Parameters:
containerId- of the container that was completed.- Returns:
- (possibly empty) list of operations that require elevated privileges
- Throws:
ResourceHandlerException
-
teardown
Description copied from interface:ResourceHandlerTeardown environment for resource subsystem if requested. This method needs to be used with care since it could impact running containers.- Specified by:
teardownin interfaceResourceHandler- Returns:
- (possibly empty) list of operations that require elevated privileges
- Throws:
ResourceHandlerException
-
toString
-