java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSMaxRunningAppsEnforcer

public class CSMaxRunningAppsEnforcer extends Object
Handles tracking and enforcement for user and queue maxRunningApps constraints.
  • Constructor Details

    • CSMaxRunningAppsEnforcer

      public CSMaxRunningAppsEnforcer(CapacityScheduler scheduler)
  • Method Details

    • checkRunnabilityWithUpdate

      public boolean checkRunnabilityWithUpdate(FiCaSchedulerApp attempt)
      Checks whether making the application runnable would exceed any maxRunningApps limits. Also sets the "runnable" flag on the attempt.
      Parameters:
      attempt - the app attempt being checked
      Returns:
      true if the application is runnable; false otherwise
    • trackApp

      public void trackApp(FiCaSchedulerApp app)
    • updateRunnabilityOnReload

      public void updateRunnabilityOnReload()
      This is called after reloading the allocation configuration when the scheduler is reinitialized Checks to see whether any non-runnable applications become runnable now that the max running apps of given queue has been changed Runs in O(n) where n is the number of apps that are non-runnable and in the queues that went from having no slack to having slack.
    • updateRunnabilityOnAppRemoval

      public void updateRunnabilityOnAppRemoval(FiCaSchedulerApp app)
      Checks to see whether any other applications runnable now that the given application has been removed from the given queue. And makes them so. Runs in O(n log(n)) where n is the number of queues that are under the highest queue that went from having no slack to having slack.
      Parameters:
      app - FiCaSchedulerApp.
    • untrackApp

      public void untrackApp(FiCaSchedulerApp app)