java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler<T,N>
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service, org.apache.hadoop.yarn.event.EventHandler<SchedulerEvent>, Recoverable, ResourceScheduler, YarnScheduler
Direct Known Subclasses:
CapacityScheduler, FairScheduler, FifoScheduler

@Private @Unstable public abstract class AbstractYarnScheduler<T extends SchedulerApplicationAttempt,N extends SchedulerNode> extends org.apache.hadoop.service.AbstractService implements ResourceScheduler
  • Field Details

  • Constructor Details

    • AbstractYarnScheduler

      public AbstractYarnScheduler(String name)
      Construct the service.
      Parameters:
      name - service name
  • Method Details

    • serviceInit

      public void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
      Overrides:
      serviceInit in class org.apache.hadoop.service.AbstractService
      Throws:
      Exception
    • 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
    • getNodeTracker

      @VisibleForTesting public ClusterNodeTracker<N> getNodeTracker()
    • getSchedulingMonitorManager

      @VisibleForTesting public SchedulingMonitorManager getSchedulingMonitorManager()
    • getTransferredContainers

      public List<org.apache.hadoop.yarn.api.records.Container> getTransferredContainers(org.apache.hadoop.yarn.api.records.ApplicationAttemptId currentAttempt)
      Description copied from interface: YarnScheduler
      Get previous attempts' live containers for work-preserving AM restart.
      Specified by:
      getTransferredContainers in interface YarnScheduler
      Parameters:
      currentAttempt - the id of the application attempt
      Returns:
      list of live containers for the given attempt
    • getSchedulerApplications

      public Map<org.apache.hadoop.yarn.api.records.ApplicationId,SchedulerApplication<T>> getSchedulerApplications()
    • getBlacklistedNodes

      public List<N> getBlacklistedNodes(SchedulerApplicationAttempt app)
      Add blacklisted NodeIds to the list that is passed.
      Parameters:
      app - application attempt.
      Returns:
      blacklisted NodeIds.
    • getNodes

      public List<N> getNodes(NodeFilter filter)
    • shouldContainersBeAutoUpdated

      public boolean shouldContainersBeAutoUpdated()
    • getClusterResource

      public org.apache.hadoop.yarn.api.records.Resource getClusterResource()
      Description copied from interface: YarnScheduler
      Get the whole resource capacity of the cluster.
      Specified by:
      getClusterResource in interface YarnScheduler
      Returns:
      the whole resource capacity of the cluster.
    • getMinimumResourceCapability

      public org.apache.hadoop.yarn.api.records.Resource getMinimumResourceCapability()
      Description copied from interface: YarnScheduler
      Get minimum allocatable Resource.
      Specified by:
      getMinimumResourceCapability in interface YarnScheduler
      Returns:
      minimum allocatable resource
    • getMaximumResourceCapability

      public org.apache.hadoop.yarn.api.records.Resource getMaximumResourceCapability()
      Description copied from interface: YarnScheduler
      Get maximum allocatable Resource at the cluster level.
      Specified by:
      getMaximumResourceCapability in interface YarnScheduler
      Returns:
      maximum allocatable resource
    • getMaximumResourceCapability

      public org.apache.hadoop.yarn.api.records.Resource getMaximumResourceCapability(String queueName)
      Description copied from interface: YarnScheduler
      Get maximum allocatable Resource for the queue specified.
      Specified by:
      getMaximumResourceCapability in interface YarnScheduler
      Parameters:
      queueName - queue name
      Returns:
      maximum allocatable resource
    • initMaximumResourceCapability

      protected void initMaximumResourceCapability(org.apache.hadoop.yarn.api.records.Resource maximumAllocation)
    • getSchedulerHealth

      public SchedulerHealth getSchedulerHealth()
    • setLastNodeUpdateTime

      protected void setLastNodeUpdateTime(long time)
    • getLastNodeUpdateTime

      public long getLastNodeUpdateTime()
    • getSkipNodeInterval

      public long getSkipNodeInterval()
    • containerLaunchedOnNode

      protected void containerLaunchedOnNode(org.apache.hadoop.yarn.api.records.ContainerId containerId, SchedulerNode node)
    • containerIncreasedOnNode

      protected void containerIncreasedOnNode(org.apache.hadoop.yarn.api.records.ContainerId containerId, SchedulerNode node, org.apache.hadoop.yarn.api.records.Container increasedContainerReportedByNM)
    • getApplicationAttempt

      public T getApplicationAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)
    • getSchedulerAppInfo

      public SchedulerAppReport getSchedulerAppInfo(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
      Description copied from interface: YarnScheduler
      Get the Scheduler app for a given app attempt Id.
      Specified by:
      getSchedulerAppInfo in interface YarnScheduler
      Parameters:
      appAttemptId - the id of the application attempt
      Returns:
      SchedulerApp for this given attempt.
    • getAppResourceUsageReport

      public org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport getAppResourceUsageReport(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
      Description copied from interface: YarnScheduler
      Get a resource usage report from a given app attempt ID.
      Specified by:
      getAppResourceUsageReport in interface YarnScheduler
      Parameters:
      appAttemptId - the id of the application attempt
      Returns:
      resource usage report for this given attempt
    • getCurrentAttemptForContainer

      public T getCurrentAttemptForContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
    • getRMContainer

      public RMContainer getRMContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
      Description copied from interface: YarnScheduler
      Get the container for the given containerId.
      Specified by:
      getRMContainer in interface YarnScheduler
      Parameters:
      containerId - the given containerId.
      Returns:
      the container for the given containerId.
    • getNodeReport

      public SchedulerNodeReport getNodeReport(org.apache.hadoop.yarn.api.records.NodeId nodeId)
      Description copied from interface: YarnScheduler
      Get node resource usage report.
      Specified by:
      getNodeReport in interface YarnScheduler
      Parameters:
      nodeId - nodeId.
      Returns:
      the SchedulerNodeReport for the node or null if nodeId does not point to a defined node.
    • moveApplication

      public String moveApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId, String newQueue) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: YarnScheduler
      Moves the given application to the given queue.
      Specified by:
      moveApplication in interface YarnScheduler
      Parameters:
      appId - application Id
      newQueue - the given queue.
      Returns:
      the name of the queue the application was placed into
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the move cannot be carried out
    • preValidateMoveApplication

      public void preValidateMoveApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId, String newQueue) throws org.apache.hadoop.yarn.exceptions.YarnException
      Specified by:
      preValidateMoveApplication in interface YarnScheduler
      Parameters:
      appId - Application ID
      newQueue - Target QueueName
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the pre-validation for move cannot be carried out
    • removeQueue

      public void removeQueue(String queueName) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: YarnScheduler
      Remove an existing queue. Implementations might limit when a queue could be removed (e.g., must have zero entitlement, and no applications running, or must be a leaf, etc..).
      Specified by:
      removeQueue in interface YarnScheduler
      Parameters:
      queueName - name of the queue to remove
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - when yarn exception occur.
    • addQueue

      public void addQueue(Queue newQueue) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Description copied from interface: YarnScheduler
      Add to the scheduler a new Queue. Implementations might limit what type of queues can be dynamically added (e.g., Queue must be a leaf, must be attached to existing parent, must have zero entitlement).
      Specified by:
      addQueue in interface YarnScheduler
      Parameters:
      newQueue - the queue being added.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - when yarn exception occur.
      IOException - when io exception occur.
    • setEntitlement

      public void setEntitlement(String queue, QueueEntitlement entitlement) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: YarnScheduler
      This method increase the entitlement for current queue (must respect invariants, e.g., no overcommit of parents, non negative, etc.). Entitlement is a general term for weights in FairScheduler, capacity for the CapacityScheduler, etc.
      Specified by:
      setEntitlement in interface YarnScheduler
      Parameters:
      queue - the queue for which we change entitlement
      entitlement - the new entitlement for the queue (capacity, maxCapacity, etc..)
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - when yarn exception occur.
    • recoverContainersOnNode

      public void recoverContainersOnNode(List<org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus> containerReports, RMNode nm)
    • autoCorrectContainerAllocation

      @VisibleForTesting protected void autoCorrectContainerAllocation(List<org.apache.hadoop.yarn.api.records.ResourceRequest> resourceRequests, SchedulerApplicationAttempt application)
      Autocorrect container resourceRequests by decrementing the number of newly allocated containers from the current container request. This also updates the newlyAllocatedContainers to be within the limits of the current container resourceRequests. ResourceRequests locality/resourceName is not considered while autocorrecting the container request, hence when there are two types of resourceRequest which is same except for the locality/resourceName, it is counted as same AbstractYarnScheduler<T extends SchedulerApplicationAttempt,N extends SchedulerNode>.ContainerObjectType and the container ask and number of newly allocated container is decremented accordingly. For example when a client requests for 4 containers with locality/resourceName as "node1", AMRMClientaugments the resourceRequest into two where R1(numContainer=4,locality=*) and R2(numContainer=4,locality=node1), if Yarn allocated 6 containers previously, it will release 2 containers as well as update the container ask to 0. If there is a client which directly calls Yarn (without AMRMClient) with two where R1(numContainer=4,locality=*) and R2(numContainer=4,locality=node1) the autocorrection may not work as expected. The use case of such client is very rare.

      This method is called from YarnScheduler.allocate(org.apache.hadoop.yarn.api.records.ApplicationAttemptId, java.util.List<org.apache.hadoop.yarn.api.records.ResourceRequest>, java.util.List<org.apache.hadoop.yarn.api.records.SchedulingRequest>, java.util.List<org.apache.hadoop.yarn.api.records.ContainerId>, java.util.List<java.lang.String>, java.util.List<java.lang.String>, org.apache.hadoop.yarn.server.resourcemanager.scheduler.ContainerUpdates) method. It is package private to be used within the scheduler package only.

      Parameters:
      resourceRequests - List of resources to be allocated
      application - ApplicationAttempt
    • createReleaseCache

      protected void createReleaseCache()
    • clearPendingContainerCache

      @VisibleForTesting public void clearPendingContainerCache()
    • completedContainer

      @VisibleForTesting @Private public void completedContainer(RMContainer rmContainer, org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus, RMContainerEventType event)
    • completedContainerInternal

      protected abstract void completedContainerInternal(RMContainer rmContainer, org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus, RMContainerEventType event)
    • releaseContainers

      protected void releaseContainers(List<org.apache.hadoop.yarn.api.records.ContainerId> containers, SchedulerApplicationAttempt attempt)
    • getSchedulerNode

      public N getSchedulerNode(org.apache.hadoop.yarn.api.records.NodeId nodeId)
      Description copied from interface: YarnScheduler
      Get SchedulerNode corresponds to nodeId.
      Specified by:
      getSchedulerNode in interface YarnScheduler
      Parameters:
      nodeId - the node id of RMNode
      Returns:
      SchedulerNode corresponds to nodeId
    • moveAllApps

      public void moveAllApps(String sourceQueue, String destQueue) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: YarnScheduler
      Completely drain sourceQueue of applications, by moving all of them to destQueue.
      Specified by:
      moveAllApps in interface YarnScheduler
      Parameters:
      sourceQueue - sourceQueue.
      destQueue - destQueue.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - when yarn exception occur.
    • killAllAppsInQueue

      public void killAllAppsInQueue(String queueName) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: YarnScheduler
      Terminate all applications in the specified queue.
      Specified by:
      killAllAppsInQueue in interface YarnScheduler
      Parameters:
      queueName - the name of queue to be drained
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - when yarn exception occur.
    • updateNodeResource

      public void updateNodeResource(RMNode nm, org.apache.hadoop.yarn.api.records.ResourceOption resourceOption)
      Process resource update on a node.
      Parameters:
      nm - RMNode.
      resourceOption - resourceOption.
    • getSchedulingResourceTypes

      public EnumSet<org.apache.hadoop.yarn.proto.YarnServiceProtos.SchedulerResourceTypes> getSchedulingResourceTypes()
      Return a collection of the resource types that are considered when scheduling
      Specified by:
      getSchedulingResourceTypes in interface YarnScheduler
      Returns:
      an EnumSet containing the resource types
    • getPlanQueues

      public Set<String> getPlanQueues() throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: YarnScheduler
      Gets the list of names for queues managed by the Reservation System.
      Specified by:
      getPlanQueues in interface YarnScheduler
      Returns:
      the list of queues which support reservations
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - when yarn exception occur.
    • placementConstraintEnabled

      public boolean placementConstraintEnabled()
      By default placement constraint is disabled. Schedulers which support placement constraint can override this value.
      Returns:
      enabled or not
    • refreshMaximumAllocation

      protected void refreshMaximumAllocation(org.apache.hadoop.yarn.api.records.Resource newMaxAlloc)
    • getPendingResourceRequestsForAttempt

      public List<org.apache.hadoop.yarn.api.records.ResourceRequest> getPendingResourceRequestsForAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)
      Description copied from interface: YarnScheduler
      Get pending resource request for specified application attempt.
      Specified by:
      getPendingResourceRequestsForAttempt in interface YarnScheduler
      Parameters:
      attemptId - the id of the application attempt
      Returns:
      pending resource requests.
    • getPendingSchedulingRequestsForAttempt

      public List<org.apache.hadoop.yarn.api.records.SchedulingRequest> getPendingSchedulingRequestsForAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)
      Description copied from interface: YarnScheduler
      Get pending scheduling request for specified application attempt.
      Specified by:
      getPendingSchedulingRequestsForAttempt in interface YarnScheduler
      Parameters:
      attemptId - the id of the application attempt
      Returns:
      pending scheduling requests
    • checkAndGetApplicationPriority

      public org.apache.hadoop.yarn.api.records.Priority checkAndGetApplicationPriority(org.apache.hadoop.yarn.api.records.Priority priorityRequestedByApp, org.apache.hadoop.security.UserGroupInformation user, String queuePath, org.apache.hadoop.yarn.api.records.ApplicationId applicationId) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: YarnScheduler
      Verify whether a submitted application priority is valid as per configured Queue
      Specified by:
      checkAndGetApplicationPriority in interface YarnScheduler
      Parameters:
      priorityRequestedByApp - Submitted Application priority.
      user - User who submitted the Application
      queuePath - Name of the Queue
      applicationId - Application ID
      Returns:
      Updated Priority from scheduler
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - when yarn exception occur.
    • updateApplicationPriority

      public org.apache.hadoop.yarn.api.records.Priority updateApplicationPriority(org.apache.hadoop.yarn.api.records.Priority newPriority, org.apache.hadoop.yarn.api.records.ApplicationId applicationId, org.apache.hadoop.thirdparty.com.google.common.util.concurrent.SettableFuture<Object> future, org.apache.hadoop.security.UserGroupInformation user) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: YarnScheduler
      Change application priority of a submitted application at runtime
      Specified by:
      updateApplicationPriority in interface YarnScheduler
      Parameters:
      newPriority - Submitted Application priority.
      applicationId - Application ID
      future - Sets any type of exception happened from StateStore
      user - who submitted the application
      Returns:
      updated priority
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - when yarn exception occur.
    • getMaxClusterLevelAppPriority

      public org.apache.hadoop.yarn.api.records.Priority getMaxClusterLevelAppPriority()
      Description copied from interface: YarnScheduler
      Get cluster max priority.
      Specified by:
      getMaxClusterLevelAppPriority in interface YarnScheduler
      Returns:
      maximum priority of cluster
    • setClusterMaxPriority

      public void setClusterMaxPriority(org.apache.hadoop.conf.Configuration conf) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: YarnScheduler
      Set the cluster max priority.
      Specified by:
      setClusterMaxPriority in interface YarnScheduler
      Parameters:
      conf - Configuration.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - when yarn exception occur.
    • createSchedContainerChangeRequests

      protected List<SchedContainerChangeRequest> createSchedContainerChangeRequests(List<org.apache.hadoop.yarn.api.records.UpdateContainerRequest> changeRequests, boolean increase)
    • getActivitiesManager

      public ActivitiesManager getActivitiesManager()
    • getClock

      public org.apache.hadoop.yarn.util.Clock getClock()
    • setClock

      @VisibleForTesting public void setClock(org.apache.hadoop.yarn.util.Clock clock)
    • getNode

      @Lock(org.apache.hadoop.yarn.server.utils.Lock.NoLock.class) public SchedulerNode getNode(org.apache.hadoop.yarn.api.records.NodeId nodeId)
    • updateSchedulerHealthInformation

      protected void updateSchedulerHealthInformation(org.apache.hadoop.yarn.api.records.Resource releasedResources, int releasedContainers)
      Update schedulerHealth information.
      Parameters:
      releasedResources - Reference resource object for completed containers
      releasedContainers - Count of released containers
    • updateNodeResourceUtilization

      protected void updateNodeResourceUtilization(RMNode nm, SchedulerNode schedulerNode)
      Update container and utilization information on the NodeManager.
      Parameters:
      nm - The NodeManager to update
      schedulerNode - schedulerNode
    • nodeUpdate

      protected void nodeUpdate(RMNode nm)
      Process a heartbeat update from a node.
      Parameters:
      nm - The RMNode corresponding to the NodeManager
    • getNormalizedResource

      public org.apache.hadoop.yarn.api.records.Resource getNormalizedResource(org.apache.hadoop.yarn.api.records.Resource requestedResource, org.apache.hadoop.yarn.api.records.Resource maxResourceCapability)
      Description copied from interface: YarnScheduler
      Normalize a resource request using scheduler level maximum resource or queue based maximum resource.
      Specified by:
      getNormalizedResource in interface YarnScheduler
      Parameters:
      requestedResource - the resource to be normalized
      maxResourceCapability - Maximum container allocation value, if null or empty scheduler level maximum container allocation value will be used
      Returns:
      the normalized resource
    • normalizeResourceRequests

      protected void normalizeResourceRequests(List<org.apache.hadoop.yarn.api.records.ResourceRequest> asks)
      Normalize a list of resource requests.
      Parameters:
      asks - resource requests
    • normalizeResourceRequests

      protected void normalizeResourceRequests(List<org.apache.hadoop.yarn.api.records.ResourceRequest> asks, String queueName)
      Normalize a list of resource requests using queue maximum resource allocations.
      Parameters:
      asks - resource requests
      queueName - queue Name.
    • handleContainerUpdates

      protected void handleContainerUpdates(SchedulerApplicationAttempt appAttempt, ContainerUpdates updates)
    • rollbackContainerUpdate

      protected void rollbackContainerUpdate(org.apache.hadoop.yarn.api.records.ContainerId containerId)
      Rollback container update after expiry.
      Parameters:
      containerId - ContainerId.
    • getNodeIds

      public List<org.apache.hadoop.yarn.api.records.NodeId> getNodeIds(String resourceName)
      Description copied from interface: ResourceScheduler
      Get the NodeId available in the cluster by resource name.
      Specified by:
      getNodeIds in interface ResourceScheduler
      Parameters:
      resourceName - resource name
      Returns:
      the number of available NodeId by resource name.
    • asyncContainerRelease

      public void asyncContainerRelease(RMContainer container)
      To be used to release a container via a Scheduler Event rather than in the same thread.
      Parameters:
      container - Container.
    • getMinimumAllocation

      public org.apache.hadoop.yarn.api.records.Resource getMinimumAllocation()
    • getMaximumAllocation

      public org.apache.hadoop.yarn.api.records.Resource getMaximumAllocation()
      Get a Resource object with for the maximum allocation possible.
      Returns:
      a Resource object with the maximum allocation for the scheduler
    • checkAndGetApplicationLifetime

      public long checkAndGetApplicationLifetime(String queueName, long lifetime, RMAppImpl app)
      Description copied from interface: YarnScheduler
      Verify whether a submitted application lifetime is valid as per configured Queue lifetime.
      Specified by:
      checkAndGetApplicationLifetime in interface YarnScheduler
      Parameters:
      queueName - Name of the Queue
      lifetime - configured application lifetime
      app - details of app
      Returns:
      valid lifetime as per queue
    • getMaximumApplicationLifetime

      public long getMaximumApplicationLifetime(String queueName)
      Description copied from interface: YarnScheduler
      Get maximum lifetime for a queue.
      Specified by:
      getMaximumApplicationLifetime in interface YarnScheduler
      Parameters:
      queueName - to get lifetime
      Returns:
      maximum lifetime in seconds
    • killContainer

      @VisibleForTesting public abstract void killContainer(RMContainer container)
      Kill a RMContainer. This is meant to be called in tests only to simulate AM container failures.
      Parameters:
      container - the container to kill
    • update

      @VisibleForTesting public void update()
      Update internal state of the scheduler. This can be useful for scheduler implementations that maintain some state that needs to be periodically updated; for example, metrics or queue resources. It will be called by the AbstractYarnScheduler<T extends SchedulerApplicationAttempt,N extends SchedulerNode>.org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler.UpdateThread every updateInterval. By default, it will not run; subclasses should set updateInterval to a positive value during serviceInit(Configuration) if they want to enable the thread.
    • triggerUpdate

      protected void triggerUpdate()
      Allows AbstractYarnScheduler<T extends SchedulerApplicationAttempt,N extends SchedulerNode>.org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler.UpdateThread to start processing without waiting till updateInterval.
    • reinitialize

      public void reinitialize(org.apache.hadoop.conf.Configuration conf, RMContext rmContext) throws IOException
      Description copied from interface: ResourceScheduler
      Re-initialize the ResourceScheduler.
      Specified by:
      reinitialize in interface ResourceScheduler
      Parameters:
      conf - configuration
      rmContext - RMContext.
      Throws:
      IOException - an I/O exception has occurred.
    • attemptAllocationOnNode

      public boolean attemptAllocationOnNode(SchedulerApplicationAttempt appAttempt, org.apache.hadoop.yarn.api.records.SchedulingRequest schedulingRequest, SchedulerNode schedulerNode)
      Default implementation. Always returns false.
      Specified by:
      attemptAllocationOnNode in interface ResourceScheduler
      Parameters:
      appAttempt - ApplicationAttempt.
      schedulingRequest - SchedulingRequest.
      schedulerNode - SchedulerNode.
      Returns:
      Success or not.
    • resetSchedulerMetrics

      public void resetSchedulerMetrics()
      Description copied from interface: ResourceScheduler
      Reset scheduler metrics.
      Specified by:
      resetSchedulerMetrics in interface ResourceScheduler