Class ResourceTrackerService

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.server.resourcemanager.ResourceTrackerService
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service, org.apache.hadoop.yarn.server.api.ResourceTracker

public class ResourceTrackerService extends org.apache.hadoop.service.AbstractService implements org.apache.hadoop.yarn.server.api.ResourceTracker
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service

    org.apache.hadoop.service.Service.STATE
  • Constructor Summary

    Constructors
    Constructor
    Description
    ResourceTrackerService(RMContext rmContext, NodesListManager nodesListManager, NMLivelinessMonitor nmLivelinessMonitor, RMContainerTokenSecretManager containerTokenSecretManager, NMTokenSecretManagerInRM nmTokenSecretManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.hadoop.ipc.Server
     
    void
    loadDynamicResourceConfiguration(org.apache.hadoop.conf.Configuration conf)
    Load DynamicResourceConfiguration from dynamic-resources.xml.
    org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatResponse
    nodeHeartbeat(org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatRequest request)
     
    org.apache.hadoop.yarn.server.api.protocolrecords.RegisterNodeManagerResponse
    registerNodeManager(org.apache.hadoop.yarn.server.api.protocolrecords.RegisterNodeManagerRequest request)
     
    static org.apache.hadoop.net.Node
    resolve(String hostName)
    resolving the network topology.
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
     
    protected void
     
    protected void
     
    org.apache.hadoop.yarn.server.api.protocolrecords.UnRegisterNodeManagerResponse
    unRegisterNodeManager(org.apache.hadoop.yarn.server.api.protocolrecords.UnRegisterNodeManagerRequest request)
     
    void
    Update DynamicResourceConfiguration with new configuration.
    void
    updateHeartBeatConfiguration(org.apache.hadoop.conf.Configuration conf)
    Update HearBeatConfiguration with new configuration.

    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
  • Constructor Details

  • Method Details

    • serviceInit

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

      public void loadDynamicResourceConfiguration(org.apache.hadoop.conf.Configuration conf) throws IOException
      Load DynamicResourceConfiguration from dynamic-resources.xml.
      Parameters:
      conf - Configuration.
      Throws:
      IOException - an I/O exception has occurred.
    • updateDynamicResourceConfiguration

      public void updateDynamicResourceConfiguration(DynamicResourceConfiguration conf)
      Update DynamicResourceConfiguration with new configuration.
      Parameters:
      conf - DynamicResourceConfiguration.
    • updateHeartBeatConfiguration

      public void updateHeartBeatConfiguration(org.apache.hadoop.conf.Configuration conf)
      Update HearBeatConfiguration with new configuration.
      Parameters:
      conf - Yarn Configuration
    • serviceStart

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

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

      public org.apache.hadoop.yarn.server.api.protocolrecords.RegisterNodeManagerResponse registerNodeManager(org.apache.hadoop.yarn.server.api.protocolrecords.RegisterNodeManagerRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Specified by:
      registerNodeManager in interface org.apache.hadoop.yarn.server.api.ResourceTracker
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • nodeHeartbeat

      public org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatResponse nodeHeartbeat(org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Specified by:
      nodeHeartbeat in interface org.apache.hadoop.yarn.server.api.ResourceTracker
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • unRegisterNodeManager

      public org.apache.hadoop.yarn.server.api.protocolrecords.UnRegisterNodeManagerResponse unRegisterNodeManager(org.apache.hadoop.yarn.server.api.protocolrecords.UnRegisterNodeManagerRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Specified by:
      unRegisterNodeManager in interface org.apache.hadoop.yarn.server.api.ResourceTracker
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • resolve

      public static org.apache.hadoop.net.Node resolve(String hostName)
      resolving the network topology.
      Parameters:
      hostName - the hostname of this node.
      Returns:
      the resolved Node for this nodemanager.
    • getServer

      @VisibleForTesting public org.apache.hadoop.ipc.Server getServer()