Class NodeManager.NMContext
java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.NodeManager.NMContext
- All Implemented Interfaces:
Context
- Enclosing class:
- NodeManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ConcurrentMap<org.apache.hadoop.yarn.api.records.ApplicationId,Application> protected final ConcurrentMap<org.apache.hadoop.yarn.api.records.ContainerId,Container> protected final ConcurrentMap<org.apache.hadoop.yarn.api.records.ContainerId,org.apache.hadoop.yarn.api.records.Container> -
Constructor Summary
ConstructorsConstructorDescriptionNMContext(NMContainerTokenSecretManager containerTokenSecretManager, NMTokenSecretManagerInNM nmTokenSecretManager, LocalDirsHandlerService dirsHandler, org.apache.hadoop.yarn.server.security.ApplicationACLsManager aclsManager, NMStateStoreService stateStore, boolean isDistSchedulingEnabled, org.apache.hadoop.conf.Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.yarn.server.security.ApplicationACLsManagerConcurrentMap<org.apache.hadoop.yarn.api.records.ApplicationId,Application> org.apache.hadoop.conf.ConfigurationgetConf()org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocatorConcurrentMap<org.apache.hadoop.yarn.api.records.ContainerId,Container> booleanReturn the NM'sDeletionService.intReturn the node http-address.ConcurrentMap<org.apache.hadoop.yarn.api.records.ContainerId,org.apache.hadoop.yarn.api.records.Container> ConcurrentMap<org.apache.hadoop.yarn.api.records.ApplicationId,org.apache.hadoop.yarn.server.api.records.AppCollectorData> Get the list of collectors registered with the RM and known by this node.ConcurrentLinkedQueue<org.apache.hadoop.yarn.server.api.protocolrecords.LogAggregationReport>org.apache.hadoop.yarn.server.api.records.NodeHealthStatusorg.apache.hadoop.yarn.api.records.NodeIdUsable only after ContainerManager is started.Returns theNodeManagerMetricsinstance of this node.ConcurrentMap<org.apache.hadoop.yarn.api.records.ApplicationId,org.apache.hadoop.yarn.server.api.records.AppCollectorData> Get the list of collectors that are registering with the RM from this node.Map<org.apache.hadoop.yarn.api.records.ApplicationId,org.apache.hadoop.security.Credentials> booleanvoidsetAuxServices(AuxServices auxServices) voidsetContainerExecutor(ContainerExecutor executor) voidsetContainerManager(ContainerManager containerManager) voidsetContainerStateTransitionListener(ContainerStateTransitionListener transitionListener) voidsetDecommissioned(boolean isDecommissioned) voidsetDeletionService(DeletionService deletionService) Set the NM'sDeletionService.voidsetNMLogAggregationStatusTracker(NMLogAggregationStatusTracker nmLogAggregationStatusTracker) voidsetNMTimelinePublisher(NMTimelinePublisher nmMetricsPublisher) voidsetNodeId(org.apache.hadoop.yarn.api.records.NodeId nodeId) voidsetNodeManagerMetrics(NodeManagerMetrics nmMetrics) voidsetNodeResourceMonitor(NodeResourceMonitor nodeResourceMonitor) voidsetNodeStatusUpdater(NodeStatusUpdater nodeStatusUpdater) voidsetQueueableContainerAllocator(org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator containerAllocator) voidsetResourcePluginManager(ResourcePluginManager resourcePluginManager) voidsetSystemCrendentialsForApps(Map<org.apache.hadoop.yarn.api.records.ApplicationId, org.apache.hadoop.security.Credentials> systemCredentials) voidsetWebServer(WebServer webServer)
-
Field Details
-
applications
protected final ConcurrentMap<org.apache.hadoop.yarn.api.records.ApplicationId,Application> applications -
containers
-
increasedContainers
protected final ConcurrentMap<org.apache.hadoop.yarn.api.records.ContainerId,org.apache.hadoop.yarn.api.records.Container> increasedContainers
-
-
Constructor Details
-
NMContext
public NMContext(NMContainerTokenSecretManager containerTokenSecretManager, NMTokenSecretManagerInNM nmTokenSecretManager, LocalDirsHandlerService dirsHandler, org.apache.hadoop.yarn.server.security.ApplicationACLsManager aclsManager, NMStateStoreService stateStore, boolean isDistSchedulingEnabled, org.apache.hadoop.conf.Configuration conf)
-
-
Method Details
-
getNodeId
public org.apache.hadoop.yarn.api.records.NodeId getNodeId()Usable only after ContainerManager is started. -
getHttpPort
public int getHttpPort()Description copied from interface:ContextReturn the node http-address. Usable only after the Webserver is started.- Specified by:
getHttpPortin interfaceContext- Returns:
- the http-port
-
getApplications
public ConcurrentMap<org.apache.hadoop.yarn.api.records.ApplicationId,Application> getApplications()- Specified by:
getApplicationsin interfaceContext
-
getConf
public org.apache.hadoop.conf.Configuration getConf() -
getContainers
- Specified by:
getContainersin interfaceContext
-
getIncreasedContainers
public ConcurrentMap<org.apache.hadoop.yarn.api.records.ContainerId,org.apache.hadoop.yarn.api.records.Container> getIncreasedContainers()- Specified by:
getIncreasedContainersin interfaceContext
-
getContainerTokenSecretManager
- Specified by:
getContainerTokenSecretManagerin interfaceContext
-
getNMTokenSecretManager
- Specified by:
getNMTokenSecretManagerin interfaceContext
-
getNodeHealthStatus
public org.apache.hadoop.yarn.server.api.records.NodeHealthStatus getNodeHealthStatus()- Specified by:
getNodeHealthStatusin interfaceContext
-
getNodeResourceMonitor
- Specified by:
getNodeResourceMonitorin interfaceContext
-
setNodeResourceMonitor
-
getContainerManager
- Specified by:
getContainerManagerin interfaceContext
-
setContainerManager
-
setWebServer
-
setNodeId
public void setNodeId(org.apache.hadoop.yarn.api.records.NodeId nodeId) -
getLocalDirsHandler
- Specified by:
getLocalDirsHandlerin interfaceContext
-
getApplicationACLsManager
public org.apache.hadoop.yarn.server.security.ApplicationACLsManager getApplicationACLsManager()- Specified by:
getApplicationACLsManagerin interfaceContext
-
getNMStateStore
- Specified by:
getNMStateStorein interfaceContext
-
getDecommissioned
public boolean getDecommissioned()- Specified by:
getDecommissionedin interfaceContext
-
setDecommissioned
public void setDecommissioned(boolean isDecommissioned) - Specified by:
setDecommissionedin interfaceContext
-
getSystemCredentialsForApps
public Map<org.apache.hadoop.yarn.api.records.ApplicationId,org.apache.hadoop.security.Credentials> getSystemCredentialsForApps()- Specified by:
getSystemCredentialsForAppsin interfaceContext
-
setSystemCrendentialsForApps
public void setSystemCrendentialsForApps(Map<org.apache.hadoop.yarn.api.records.ApplicationId, org.apache.hadoop.security.Credentials> systemCredentials) -
getLogAggregationStatusForApps
public ConcurrentLinkedQueue<org.apache.hadoop.yarn.server.api.protocolrecords.LogAggregationReport> getLogAggregationStatusForApps()- Specified by:
getLogAggregationStatusForAppsin interfaceContext
-
getNodeStatusUpdater
- Specified by:
getNodeStatusUpdaterin interfaceContext
-
setNodeStatusUpdater
-
isDistributedSchedulingEnabled
public boolean isDistributedSchedulingEnabled()- Specified by:
isDistributedSchedulingEnabledin interfaceContext
-
setQueueableContainerAllocator
public void setQueueableContainerAllocator(org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator containerAllocator) -
getContainerAllocator
public org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator getContainerAllocator()- Specified by:
getContainerAllocatorin interfaceContext
-
getRegisteringCollectors
public ConcurrentMap<org.apache.hadoop.yarn.api.records.ApplicationId,org.apache.hadoop.yarn.server.api.records.AppCollectorData> getRegisteringCollectors()Description copied from interface:ContextGet the list of collectors that are registering with the RM from this node.- Specified by:
getRegisteringCollectorsin interfaceContext- Returns:
- registering collectors, or null if the timeline service v.2 is not enabled
-
getKnownCollectors
public ConcurrentMap<org.apache.hadoop.yarn.api.records.ApplicationId,org.apache.hadoop.yarn.server.api.records.AppCollectorData> getKnownCollectors()Description copied from interface:ContextGet the list of collectors registered with the RM and known by this node.- Specified by:
getKnownCollectorsin interfaceContext- Returns:
- known collectors, or null if the timeline service v.2 is not enabled.
-
setNMTimelinePublisher
- Specified by:
setNMTimelinePublisherin interfaceContext
-
getNMTimelinePublisher
- Specified by:
getNMTimelinePublisherin interfaceContext
-
getContainerExecutor
- Specified by:
getContainerExecutorin interfaceContext
-
setContainerExecutor
-
getContainerStateTransitionListener
- Specified by:
getContainerStateTransitionListenerin interfaceContext
-
setContainerStateTransitionListener
public void setContainerStateTransitionListener(ContainerStateTransitionListener transitionListener) -
getResourcePluginManager
- Specified by:
getResourcePluginManagerin interfaceContext
-
getNodeManagerMetrics
Returns theNodeManagerMetricsinstance of this node. This might return a null if the instance was not set to the context.- Specified by:
getNodeManagerMetricsin interfaceContext- Returns:
- node manager metrics.
-
setNodeManagerMetrics
-
setResourcePluginManager
-
getDeletionService
Return the NM'sDeletionService.- Specified by:
getDeletionServicein interfaceContext- Returns:
- the NM's
DeletionService.
-
setDeletionService
Set the NM'sDeletionService.- Parameters:
deletionService- theDeletionServiceto add to the Context.
-
setNMLogAggregationStatusTracker
public void setNMLogAggregationStatusTracker(NMLogAggregationStatusTracker nmLogAggregationStatusTracker) -
getNMLogAggregationStatusTracker
- Specified by:
getNMLogAggregationStatusTrackerin interfaceContext
-
setAuxServices
- Specified by:
setAuxServicesin interfaceContext
-
getAuxServices
- Specified by:
getAuxServicesin interfaceContext
-