org.apache.hadoop.yarn.server.resourcemanager
Class ResourceManager

java.lang.Object
  extended by org.apache.hadoop.service.AbstractService
      extended by org.apache.hadoop.service.CompositeService
          extended by org.apache.hadoop.yarn.server.resourcemanager.ResourceManager
All Implemented Interfaces:
Closeable, org.apache.hadoop.service.Service, Recoverable

public class ResourceManager
extends org.apache.hadoop.service.CompositeService
implements Recoverable

The ResourceManager is the main class that is a set of components. "I am the ResourceManager. All your resources belong to us..."


Nested Class Summary
static class ResourceManager.ApplicationAttemptEventDispatcher
           
static class ResourceManager.ApplicationEventDispatcher
           
static class ResourceManager.NodeEventDispatcher
           
static class ResourceManager.RMContainerPreemptEventDispatcher
           
static class ResourceManager.RMFatalEventDispatcher
           
static class ResourceManager.SchedulerEventDispatcher
           
 
Nested classes/interfaces inherited from class org.apache.hadoop.service.CompositeService
org.apache.hadoop.service.CompositeService.CompositeServiceShutdownHook
 
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE
 
Field Summary
protected  org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.RMActiveServices activeServices
          "Active" services.
protected  AdminService adminService
           
protected  org.apache.hadoop.yarn.server.security.ApplicationACLsManager applicationACLsManager
           
protected  ApplicationMasterService masterService
           
protected  NMLivelinessMonitor nmLivelinessMonitor
           
protected  NodesListManager nodesListManager
           
protected  QueueACLsManager queueACLsManager
           
protected  ResourceTrackerService resourceTracker
           
protected  RMAppManager rmAppManager
           
protected  RMContextImpl rmContext
          "Always On" services.
protected  RMSecretManagerService rmSecretManagerService
           
protected  ResourceScheduler scheduler
           
static int SHUTDOWN_HOOK_PRIORITY
          Priority of the ResourceManager shutdown hook.
 
Fields inherited from class org.apache.hadoop.service.CompositeService
STOP_ONLY_STARTED_SERVICES
 
Constructor Summary
ResourceManager()
           
 
Method Summary
protected  boolean areActiveServicesRunning()
           
protected  AdminService createAdminService()
           
protected  ApplicationMasterLauncher createAMLauncher()
           
protected  AMLivelinessMonitor createAMLivelinessMonitor()
           
protected  ApplicationMasterService createApplicationMasterService()
           
protected  ClientRMService createClientRMService()
           
protected  DelegationTokenRenewer createDelegationTokenRenewer()
           
protected  org.apache.hadoop.yarn.event.Dispatcher createDispatcher()
           
protected  QueueACLsManager createQueueACLsManager(ResourceScheduler scheduler, org.apache.hadoop.conf.Configuration conf)
           
protected  ResourceTrackerService createResourceTrackerService()
           
protected  RMAppManager createRMAppManager()
           
protected  RMSecretManagerService createRMSecretManagerService()
           
protected  ResourceScheduler createScheduler()
           
protected  org.apache.hadoop.yarn.event.EventHandler<SchedulerEvent> createSchedulerEventDispatcher()
           
protected  void doSecureLogin()
           
 AMRMTokenSecretManager getAMRMTokenSecretManager()
           
 org.apache.hadoop.yarn.server.security.ApplicationACLsManager getApplicationACLsManager()
           
 ApplicationMasterService getApplicationMasterService()
           
 ClientRMService getClientRMService()
           
static long getClusterTimeStamp()
           
 QueueACLsManager getQueueACLsManager()
           
 ResourceScheduler getResourceScheduler()
          return the scheduler.
 ResourceTrackerService getResourceTrackerService()
          return the resource tracking component.
 RMContainerTokenSecretManager getRMContainerTokenSecretManager()
           
 RMContext getRMContext()
           
 RMDelegationTokenSecretManager getRMDTSecretManager()
           
 NMTokenSecretManagerInRM getRMNMTokenSecretManager()
           
static void main(String[] argv)
           
 void recover(RMStateStore.RMState state)
           
protected  void serviceInit(org.apache.hadoop.conf.Configuration conf)
           
protected  void serviceStart()
           
protected  void serviceStop()
           
protected static void setClusterTimeStamp(long timestamp)
           
protected  void setRMStateStore(RMStateStore rmStore)
           
protected  void startWepApp()
           
protected static void validateConfigs(org.apache.hadoop.conf.Configuration conf)
           
 
Methods inherited from class org.apache.hadoop.service.CompositeService
addIfService, addService, getServices, removeService
 
Methods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SHUTDOWN_HOOK_PRIORITY

public static final int SHUTDOWN_HOOK_PRIORITY
Priority of the ResourceManager shutdown hook.

See Also:
Constant Field Values

rmContext

protected RMContextImpl rmContext
"Always On" services. Services that need to run always irrespective of the HA state of the RM.


adminService

protected AdminService adminService

activeServices

protected org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.RMActiveServices activeServices
"Active" services. Services that need to run only on the Active RM. These services are managed (initialized, started, stopped) by the CompositeService RMActiveServices. RM is active when (1) HA is disabled, or (2) HA is enabled and the RM is in Active state.


rmSecretManagerService

protected RMSecretManagerService rmSecretManagerService

scheduler

protected ResourceScheduler scheduler

masterService

protected ApplicationMasterService masterService

nmLivelinessMonitor

protected NMLivelinessMonitor nmLivelinessMonitor

nodesListManager

protected NodesListManager nodesListManager

rmAppManager

protected RMAppManager rmAppManager

applicationACLsManager

protected org.apache.hadoop.yarn.server.security.ApplicationACLsManager applicationACLsManager

queueACLsManager

protected QueueACLsManager queueACLsManager

resourceTracker

protected ResourceTrackerService resourceTracker
Constructor Detail

ResourceManager

public ResourceManager()
Method Detail

getRMContext

public RMContext getRMContext()

getClusterTimeStamp

public static long getClusterTimeStamp()

setClusterTimeStamp

protected static void setClusterTimeStamp(long timestamp)

serviceInit

protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
                    throws Exception
Overrides:
serviceInit in class org.apache.hadoop.service.CompositeService
Throws:
Exception

createQueueACLsManager

protected QueueACLsManager createQueueACLsManager(ResourceScheduler scheduler,
                                                  org.apache.hadoop.conf.Configuration conf)

setRMStateStore

protected void setRMStateStore(RMStateStore rmStore)

createSchedulerEventDispatcher

protected org.apache.hadoop.yarn.event.EventHandler<SchedulerEvent> createSchedulerEventDispatcher()

createDispatcher

protected org.apache.hadoop.yarn.event.Dispatcher createDispatcher()

createScheduler

protected ResourceScheduler createScheduler()

createAMLauncher

protected ApplicationMasterLauncher createAMLauncher()

createAMLivelinessMonitor

protected AMLivelinessMonitor createAMLivelinessMonitor()

createDelegationTokenRenewer

protected DelegationTokenRenewer createDelegationTokenRenewer()

createRMAppManager

protected RMAppManager createRMAppManager()

validateConfigs

protected static void validateConfigs(org.apache.hadoop.conf.Configuration conf)

startWepApp

protected void startWepApp()

areActiveServicesRunning

protected boolean areActiveServicesRunning()

serviceStart

protected void serviceStart()
                     throws Exception
Overrides:
serviceStart in class org.apache.hadoop.service.CompositeService
Throws:
Exception

doSecureLogin

protected void doSecureLogin()
                      throws IOException
Throws:
IOException

serviceStop

protected void serviceStop()
                    throws Exception
Overrides:
serviceStop in class org.apache.hadoop.service.CompositeService
Throws:
Exception

createResourceTrackerService

protected ResourceTrackerService createResourceTrackerService()

createClientRMService

protected ClientRMService createClientRMService()

createApplicationMasterService

protected ApplicationMasterService createApplicationMasterService()

createAdminService

protected AdminService createAdminService()

createRMSecretManagerService

protected RMSecretManagerService createRMSecretManagerService()

getClientRMService

@InterfaceAudience.Private
public ClientRMService getClientRMService()

getResourceScheduler

@InterfaceAudience.Private
public ResourceScheduler getResourceScheduler()
return the scheduler.

Returns:
the scheduler for the Resource Manager.

getResourceTrackerService

@InterfaceAudience.Private
public ResourceTrackerService getResourceTrackerService()
return the resource tracking component.

Returns:
the resource tracking component.

getApplicationMasterService

@InterfaceAudience.Private
public ApplicationMasterService getApplicationMasterService()

getApplicationACLsManager

@InterfaceAudience.Private
public org.apache.hadoop.yarn.server.security.ApplicationACLsManager getApplicationACLsManager()

getQueueACLsManager

@InterfaceAudience.Private
public QueueACLsManager getQueueACLsManager()

getRMContainerTokenSecretManager

@InterfaceAudience.Private
public RMContainerTokenSecretManager getRMContainerTokenSecretManager()

getRMNMTokenSecretManager

@InterfaceAudience.Private
public NMTokenSecretManagerInRM getRMNMTokenSecretManager()

getAMRMTokenSecretManager

@InterfaceAudience.Private
public AMRMTokenSecretManager getAMRMTokenSecretManager()

getRMDTSecretManager

@InterfaceAudience.Private
public RMDelegationTokenSecretManager getRMDTSecretManager()

recover

public void recover(RMStateStore.RMState state)
             throws Exception
Specified by:
recover in interface Recoverable
Throws:
Exception

main

public static void main(String[] argv)


Copyright © 2014 Apache Software Foundation. All Rights Reserved.