org.apache.hadoop.yarn.server.nodemanager.containermanager
Class ContainerManagerImpl

java.lang.Object
  extended by org.apache.hadoop.yarn.service.AbstractService
      extended by org.apache.hadoop.yarn.service.CompositeService
          extended by org.apache.hadoop.yarn.server.nodemanager.containermanager.ContainerManagerImpl
All Implemented Interfaces:
org.apache.hadoop.yarn.api.ContainerManager, org.apache.hadoop.yarn.event.EventHandler<ContainerManagerEvent>, org.apache.hadoop.yarn.service.Service, org.apache.hadoop.yarn.service.ServiceStateChangeListener

public class ContainerManagerImpl
extends org.apache.hadoop.yarn.service.CompositeService
implements org.apache.hadoop.yarn.service.ServiceStateChangeListener, org.apache.hadoop.yarn.api.ContainerManager, org.apache.hadoop.yarn.event.EventHandler<ContainerManagerEvent>


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.yarn.service.CompositeService
org.apache.hadoop.yarn.service.CompositeService.CompositeServiceShutdownHook
 
Nested classes/interfaces inherited from interface org.apache.hadoop.yarn.service.Service
org.apache.hadoop.yarn.service.Service.STATE
 
Field Summary
protected  LocalDirsHandlerService dirsHandler
           
protected  org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher
           
 
Constructor Summary
ContainerManagerImpl(Context context, ContainerExecutor exec, DeletionService deletionContext, NodeStatusUpdater nodeStatusUpdater, NodeManagerMetrics metrics, org.apache.hadoop.yarn.server.security.ApplicationACLsManager aclsManager, LocalDirsHandlerService dirsHandler)
           
 
Method Summary
protected  ContainersLauncher createContainersLauncher(Context context, ContainerExecutor exec)
           
protected  LogHandler createLogHandler(org.apache.hadoop.conf.Configuration conf, Context context, DeletionService deletionService)
           
protected  ResourceLocalizationService createResourceLocalizationService(ContainerExecutor exec, DeletionService deletionContext)
           
 ContainersMonitor getContainersMonitor()
           
 org.apache.hadoop.yarn.api.protocolrecords.GetContainerStatusResponse getContainerStatus(org.apache.hadoop.yarn.api.protocolrecords.GetContainerStatusRequest request)
           
 void handle(ContainerManagerEvent event)
           
 void init(org.apache.hadoop.conf.Configuration conf)
           
 void start()
           
 org.apache.hadoop.yarn.api.protocolrecords.StartContainerResponse startContainer(org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest request)
          Start a container on this NodeManager.
 void stateChanged(org.apache.hadoop.yarn.service.Service service)
           
 void stop()
           
 org.apache.hadoop.yarn.api.protocolrecords.StopContainerResponse stopContainer(org.apache.hadoop.yarn.api.protocolrecords.StopContainerRequest request)
          Stop the container running on this NodeManager.
 
Methods inherited from class org.apache.hadoop.yarn.service.CompositeService
addService, getServices, removeService
 
Methods inherited from class org.apache.hadoop.yarn.service.AbstractService
getConfig, getName, getServiceState, getStartTime, register, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dirsHandler

protected LocalDirsHandlerService dirsHandler

dispatcher

protected final org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher
Constructor Detail

ContainerManagerImpl

public ContainerManagerImpl(Context context,
                            ContainerExecutor exec,
                            DeletionService deletionContext,
                            NodeStatusUpdater nodeStatusUpdater,
                            NodeManagerMetrics metrics,
                            org.apache.hadoop.yarn.server.security.ApplicationACLsManager aclsManager,
                            LocalDirsHandlerService dirsHandler)
Method Detail

init

public void init(org.apache.hadoop.conf.Configuration conf)
Specified by:
init in interface org.apache.hadoop.yarn.service.Service
Overrides:
init in class org.apache.hadoop.yarn.service.CompositeService

createLogHandler

protected LogHandler createLogHandler(org.apache.hadoop.conf.Configuration conf,
                                      Context context,
                                      DeletionService deletionService)

getContainersMonitor

public ContainersMonitor getContainersMonitor()

createResourceLocalizationService

protected ResourceLocalizationService createResourceLocalizationService(ContainerExecutor exec,
                                                                        DeletionService deletionContext)

createContainersLauncher

protected ContainersLauncher createContainersLauncher(Context context,
                                                      ContainerExecutor exec)

start

public void start()
Specified by:
start in interface org.apache.hadoop.yarn.service.Service
Overrides:
start in class org.apache.hadoop.yarn.service.CompositeService

stop

public void stop()
Specified by:
stop in interface org.apache.hadoop.yarn.service.Service
Overrides:
stop in class org.apache.hadoop.yarn.service.CompositeService

startContainer

public org.apache.hadoop.yarn.api.protocolrecords.StartContainerResponse startContainer(org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest request)
                                                                                 throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
Start a container on this NodeManager.

Specified by:
startContainer in interface org.apache.hadoop.yarn.api.ContainerManager
Throws:
org.apache.hadoop.yarn.exceptions.YarnRemoteException

stopContainer

public org.apache.hadoop.yarn.api.protocolrecords.StopContainerResponse stopContainer(org.apache.hadoop.yarn.api.protocolrecords.StopContainerRequest request)
                                                                               throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
Stop the container running on this NodeManager.

Specified by:
stopContainer in interface org.apache.hadoop.yarn.api.ContainerManager
Throws:
org.apache.hadoop.yarn.exceptions.YarnRemoteException

getContainerStatus

public org.apache.hadoop.yarn.api.protocolrecords.GetContainerStatusResponse getContainerStatus(org.apache.hadoop.yarn.api.protocolrecords.GetContainerStatusRequest request)
                                                                                         throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
Specified by:
getContainerStatus in interface org.apache.hadoop.yarn.api.ContainerManager
Throws:
org.apache.hadoop.yarn.exceptions.YarnRemoteException

handle

public void handle(ContainerManagerEvent event)
Specified by:
handle in interface org.apache.hadoop.yarn.event.EventHandler<ContainerManagerEvent>

stateChanged

public void stateChanged(org.apache.hadoop.yarn.service.Service service)
Specified by:
stateChanged in interface org.apache.hadoop.yarn.service.ServiceStateChangeListener


Copyright © 2013 Apache Software Foundation. All Rights Reserved.