public class GpuResourceHandlerImpl extends Object implements ResourceHandler
| Modifier and Type | Field and Description | 
|---|---|
| static String | CONTAINER_ID_CLI_OPTION | 
| static String | EXCLUDED_GPUS_CLI_OPTION | 
| Constructor and Description | 
|---|
| GpuResourceHandlerImpl(Context nmContext,
                      CGroupsHandler cGroupsHandler,
                      PrivilegedOperationExecutor privilegedOperationExecutor,
                      GpuDiscoverer gpuDiscoverer) | 
| Modifier and Type | Method and Description | 
|---|---|
| List<PrivilegedOperation> | bootstrap(org.apache.hadoop.conf.Configuration configuration)Bootstrap resource susbsystem. | 
| GpuResourceAllocator | getGpuAllocator() | 
| List<PrivilegedOperation> | postComplete(org.apache.hadoop.yarn.api.records.ContainerId containerId)Perform any tasks necessary after container completion. | 
| List<PrivilegedOperation> | preStart(Container container)Prepare a resource environment for container launch | 
| List<PrivilegedOperation> | reacquireContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)Require state for container that was already launched | 
| List<PrivilegedOperation> | teardown()Teardown environment for resource subsystem if requested. | 
| String | toString() | 
| List<PrivilegedOperation> | updateContainer(Container container)Update state for container that was already launched | 
public static final String EXCLUDED_GPUS_CLI_OPTION
public static final String CONTAINER_ID_CLI_OPTION
public GpuResourceHandlerImpl(Context nmContext, CGroupsHandler cGroupsHandler, PrivilegedOperationExecutor privilegedOperationExecutor, GpuDiscoverer gpuDiscoverer)
public List<PrivilegedOperation> bootstrap(org.apache.hadoop.conf.Configuration configuration) throws ResourceHandlerException
ResourceHandlerbootstrap in interface ResourceHandlerResourceHandlerExceptionpublic List<PrivilegedOperation> preStart(Container container) throws ResourceHandlerException
ResourceHandlerpreStart in interface ResourceHandlercontainer - Container being launchedResourceHandlerExceptionpublic GpuResourceAllocator getGpuAllocator()
public List<PrivilegedOperation> reacquireContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId) throws ResourceHandlerException
ResourceHandlerreacquireContainer in interface ResourceHandlercontainerId - id of the container being reacquired.ResourceHandlerExceptionpublic List<PrivilegedOperation> updateContainer(Container container) throws ResourceHandlerException
ResourceHandlerupdateContainer in interface ResourceHandlercontainer - the container being updated.ResourceHandlerExceptionpublic List<PrivilegedOperation> postComplete(org.apache.hadoop.yarn.api.records.ContainerId containerId) throws ResourceHandlerException
ResourceHandlerpostComplete in interface ResourceHandlercontainerId - of the container that was completed.ResourceHandlerExceptionpublic List<PrivilegedOperation> teardown() throws ResourceHandlerException
ResourceHandlerteardown in interface ResourceHandlerResourceHandlerExceptionCopyright © 2008–2023 Apache Software Foundation. All rights reserved.