org.apache.hadoop.yarn.server.resourcemanager
Class ResourceManager
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.service.CompositeService
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 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 |
| Fields inherited from class org.apache.hadoop.service.CompositeService |
STOP_ONLY_STARTED_SERVICES |
| 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 |
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 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
reservationSystem
protected ReservationSystem reservationSystem
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
webAppAddress
protected String webAppAddress
ResourceManager
public ResourceManager()
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()
createReservationSystem
protected ReservationSystem createReservationSystem()
createAMLauncher
protected ApplicationMasterLauncher createAMLauncher()
createAMLivelinessMonitor
protected AMLivelinessMonitor createAMLivelinessMonitor()
createNodeLabelManager
protected RMNodeLabelsManager createNodeLabelManager()
throws InstantiationException,
IllegalAccessException
- Throws:
InstantiationException
IllegalAccessException
createDelegationTokenRenewer
protected DelegationTokenRenewer createDelegationTokenRenewer()
createRMAppManager
protected RMAppManager createRMAppManager()
createRMApplicationHistoryWriter
protected RMApplicationHistoryWriter createRMApplicationHistoryWriter()
createSystemMetricsPublisher
protected SystemMetricsPublisher createSystemMetricsPublisher()
validateConfigs
protected static void validateConfigs(org.apache.hadoop.conf.Configuration conf)
handleTransitionToStandBy
public void handleTransitionToStandBy()
startWepApp
protected void startWepApp()
createAndInitActiveServices
protected void createAndInitActiveServices()
throws Exception
- Helper method to create and init
activeServices. This creates an
instance of ResourceManager.RMActiveServices and initializes it.
- Throws:
Exception
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()
recover
public void recover(RMStateStore.RMState state)
throws Exception
- Specified by:
recover in interface Recoverable
- Throws:
Exception
main
public static void main(String[] argv)
getBindAddress
public static InetSocketAddress getBindAddress(org.apache.hadoop.conf.Configuration conf)
- Retrieve RM bind address from configuration
- Parameters:
conf -
- Returns:
- InetSocketAddress
Copyright © 2014 Apache Software Foundation. All Rights Reserved.