public class ResourceManager extends org.apache.hadoop.service.CompositeService implements Recoverable
Modifier and Type | Class and Description |
---|---|
static class |
ResourceManager.ApplicationAttemptEventDispatcher |
static class |
ResourceManager.ApplicationEventDispatcher |
static class |
ResourceManager.NodeEventDispatcher |
class |
ResourceManager.RMActiveServices
RMActiveServices handles all the Active services in the RM.
|
Modifier and Type | Field and Description |
---|---|
protected ResourceManager.RMActiveServices |
activeServices
"Active" services.
|
protected AdminService |
adminService |
protected org.apache.hadoop.yarn.server.security.ApplicationACLsManager |
applicationACLsManager |
static int |
EPOCH_BIT_SHIFT
Used for generation of various ids.
|
protected ApplicationMasterService |
masterService |
protected NMLivelinessMonitor |
nmLivelinessMonitor |
protected NodesListManager |
nodesListManager |
protected QueueACLsManager |
queueACLsManager |
protected ReservationSystem |
reservationSystem |
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.
|
static String |
UI2_WEBAPP_NAME |
protected String |
webAppAddress |
Constructor and Description |
---|
ResourceManager() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
areActiveServicesRunning() |
protected AdminService |
createAdminService() |
protected AllocationTagsManager |
createAllocationTagsManager() |
protected ApplicationMasterLauncher |
createAMLauncher() |
protected AMLivelinessMonitor |
createAMLivelinessMonitor() |
protected void |
createAndInitActiveServices(boolean fromActive)
Helper method to create and init
activeServices . |
org.apache.hadoop.util.curator.ZKCuratorManager |
createAndStartZKManager(org.apache.hadoop.conf.Configuration config)
Get ZooKeeper Curator manager, creating and starting if not exists.
|
protected ApplicationMasterService |
createApplicationMasterService() |
protected ClientRMService |
createClientRMService() |
protected DelegationTokenRenewer |
createDelegationTokenRenewer() |
protected org.apache.hadoop.yarn.event.Dispatcher |
createDispatcher() |
protected EmbeddedElector |
createEmbeddedElector() |
protected RMNodeLabelsManager |
createNodeLabelManager() |
protected PlacementConstraintManagerService |
createPlacementConstraintManager() |
protected QueueACLsManager |
createQueueACLsManager(ResourceScheduler scheduler,
org.apache.hadoop.conf.Configuration conf) |
protected ReservationSystem |
createReservationSystem() |
protected ResourceProfilesManager |
createResourceProfileManager() |
protected ResourceTrackerService |
createResourceTrackerService() |
protected RMApplicationHistoryWriter |
createRMApplicationHistoryWriter() |
protected RMAppLifetimeMonitor |
createRMAppLifetimeMonitor() |
protected RMAppManager |
createRMAppManager() |
protected RMDelegatedNodeLabelsUpdater |
createRMDelegatedNodeLabelsUpdater()
Create RMDelegatedNodeLabelsUpdater based on configuration.
|
protected RMSecretManagerService |
createRMSecretManagerService() |
protected ResourceScheduler |
createScheduler() |
protected org.apache.hadoop.yarn.event.EventHandler<SchedulerEvent> |
createSchedulerEventDispatcher() |
protected org.apache.hadoop.yarn.server.service.SystemServiceManager |
createServiceManager() |
protected SystemMetricsPublisher |
createSystemMetricsPublisher() |
protected void |
doSecureLogin() |
org.apache.hadoop.yarn.server.security.ApplicationACLsManager |
getApplicationACLsManager() |
ApplicationMasterService |
getApplicationMasterService() |
static InetSocketAddress |
getBindAddress(org.apache.hadoop.conf.Configuration conf)
Retrieve RM bind address from configuration
|
ClientRMService |
getClientRMService() |
static long |
getClusterTimeStamp() |
org.apache.curator.framework.CuratorFramework |
getCurator() |
FederationStateStoreService |
getFederationStateStoreService() |
QueueACLsManager |
getQueueACLsManager() |
ResourceScheduler |
getResourceScheduler()
return the scheduler.
|
ResourceTrackerService |
getResourceTrackerService()
return the resource tracking component.
|
RMContext |
getRMContext() |
org.apache.hadoop.util.curator.ZKCuratorManager |
getZKManager() |
String |
getZkRootNodePassword() |
static org.apache.hadoop.http.HttpServer2.Builder |
httpServerTemplateForRM(org.apache.hadoop.conf.Configuration conf,
InetSocketAddress httpAddr,
InetSocketAddress httpsAddr,
String name)
Return a HttpServer.Builder that the journalnode / namenode / secondary
namenode can use to initialize their HTTP / HTTPS server.
|
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) |
addIfService, addService, getServices, removeService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
public static final int SHUTDOWN_HOOK_PRIORITY
public static final int EPOCH_BIT_SHIFT
public static final String UI2_WEBAPP_NAME
protected RMContextImpl rmContext
protected AdminService adminService
protected ResourceManager.RMActiveServices activeServices
CompositeService
RMActiveServices.
RM is active when (1) HA is disabled, or (2) HA is enabled and the RM is
in Active state.protected RMSecretManagerService rmSecretManagerService
protected ResourceScheduler scheduler
protected ReservationSystem reservationSystem
protected ApplicationMasterService masterService
protected NMLivelinessMonitor nmLivelinessMonitor
protected NodesListManager nodesListManager
protected RMAppManager rmAppManager
protected org.apache.hadoop.yarn.server.security.ApplicationACLsManager applicationACLsManager
protected QueueACLsManager queueACLsManager
protected ResourceTrackerService resourceTracker
protected String webAppAddress
public RMContext getRMContext()
public static long getClusterTimeStamp()
protected static void setClusterTimeStamp(long timestamp)
protected ResourceProfilesManager createResourceProfileManager()
protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
serviceInit
in class org.apache.hadoop.service.CompositeService
Exception
protected EmbeddedElector createEmbeddedElector() throws IOException
IOException
public org.apache.hadoop.util.curator.ZKCuratorManager createAndStartZKManager(org.apache.hadoop.conf.Configuration config) throws IOException
config
- Configuration for the ZooKeeper curator.IOException
- If it cannot create the manager.public org.apache.hadoop.util.curator.ZKCuratorManager getZKManager()
public org.apache.curator.framework.CuratorFramework getCurator()
public String getZkRootNodePassword()
protected QueueACLsManager createQueueACLsManager(ResourceScheduler scheduler, org.apache.hadoop.conf.Configuration conf)
protected void setRMStateStore(RMStateStore rmStore)
protected org.apache.hadoop.yarn.event.EventHandler<SchedulerEvent> createSchedulerEventDispatcher()
protected org.apache.hadoop.yarn.event.Dispatcher createDispatcher()
protected ResourceScheduler createScheduler()
protected ReservationSystem createReservationSystem()
protected org.apache.hadoop.yarn.server.service.SystemServiceManager createServiceManager()
protected ApplicationMasterLauncher createAMLauncher()
protected AMLivelinessMonitor createAMLivelinessMonitor()
protected RMNodeLabelsManager createNodeLabelManager() throws InstantiationException, IllegalAccessException
protected AllocationTagsManager createAllocationTagsManager()
protected PlacementConstraintManagerService createPlacementConstraintManager()
protected DelegationTokenRenewer createDelegationTokenRenewer()
protected RMAppManager createRMAppManager()
protected RMApplicationHistoryWriter createRMApplicationHistoryWriter()
protected SystemMetricsPublisher createSystemMetricsPublisher()
protected static void validateConfigs(org.apache.hadoop.conf.Configuration conf)
public static org.apache.hadoop.http.HttpServer2.Builder httpServerTemplateForRM(org.apache.hadoop.conf.Configuration conf, InetSocketAddress httpAddr, InetSocketAddress httpsAddr, String name) throws IOException
conf
- configuration objecthttpAddr
- HTTP addresshttpsAddr
- HTTPS addressname
- Name of the serverIOException
- from Builderprotected void startWepApp()
protected void createAndInitActiveServices(boolean fromActive)
activeServices
. This creates an
instance of ResourceManager.RMActiveServices
and initializes it.fromActive
- Indicates if the call is from the active state transition
or the RM initialization.protected boolean areActiveServicesRunning()
protected void serviceStart() throws Exception
serviceStart
in class org.apache.hadoop.service.CompositeService
Exception
protected void doSecureLogin() throws IOException
IOException
protected void serviceStop() throws Exception
serviceStop
in class org.apache.hadoop.service.CompositeService
Exception
protected ResourceTrackerService createResourceTrackerService()
protected ClientRMService createClientRMService()
protected ApplicationMasterService createApplicationMasterService()
protected AdminService createAdminService()
protected RMSecretManagerService createRMSecretManagerService()
protected RMDelegatedNodeLabelsUpdater createRMDelegatedNodeLabelsUpdater()
@InterfaceAudience.Private public ClientRMService getClientRMService()
@InterfaceAudience.Private public ResourceScheduler getResourceScheduler()
@InterfaceAudience.Private public ResourceTrackerService getResourceTrackerService()
@InterfaceAudience.Private public ApplicationMasterService getApplicationMasterService()
@InterfaceAudience.Private public org.apache.hadoop.yarn.server.security.ApplicationACLsManager getApplicationACLsManager()
@InterfaceAudience.Private public QueueACLsManager getQueueACLsManager()
@InterfaceAudience.Private public FederationStateStoreService getFederationStateStoreService()
public void recover(RMStateStore.RMState state) throws Exception
recover
in interface Recoverable
Exception
public static void main(String[] argv)
public static InetSocketAddress getBindAddress(org.apache.hadoop.conf.Configuration conf)
conf
- protected RMAppLifetimeMonitor createRMAppLifetimeMonitor()
Copyright © 2008–2018 Apache Software Foundation. All rights reserved.