Class RMDelegatedNodeLabelsUpdater

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.service.CompositeService
org.apache.hadoop.yarn.server.resourcemanager.nodelabels.RMDelegatedNodeLabelsUpdater
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service

public class RMDelegatedNodeLabelsUpdater extends org.apache.hadoop.service.CompositeService
Update nodes labels map for ResourceManager periodically. It collects nodes labels from RMNodeLabelsMappingProvider and updates the nodes -> labels map via RMNodeLabelsManager. This service is enabled when configuration "yarn.node-labels.configuration-type" is set to "delegated-centralized".
  • Nested Class Summary

    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

    Fields
    Modifier and Type
    Field
    Description
    static final long
     
    long
     

    Fields inherited from class org.apache.hadoop.service.CompositeService

    STOP_ONLY_STARTED_SERVICES
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
     
    protected void
     
    protected void
    Terminate the timer.
    void
    updateNodeLabels(org.apache.hadoop.yarn.api.records.NodeId node)
    Update node labels for a specified node.

    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 Details

    • DISABLE_DELEGATED_NODE_LABELS_UPDATE

      public static final long DISABLE_DELEGATED_NODE_LABELS_UPDATE
      See Also:
    • nodeLabelsUpdateInterval

      @VisibleForTesting public long nodeLabelsUpdateInterval
  • Constructor Details

    • RMDelegatedNodeLabelsUpdater

      public RMDelegatedNodeLabelsUpdater(RMContext rmContext)
  • Method Details

    • serviceInit

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

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

      protected void serviceStop() throws Exception
      Terminate the timer.
      Overrides:
      serviceStop in class org.apache.hadoop.service.CompositeService
      Throws:
      Exception - exception occurs.
    • updateNodeLabels

      public void updateNodeLabels(org.apache.hadoop.yarn.api.records.NodeId node)
      Update node labels for a specified node.
      Parameters:
      node - the node to update node labels