org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair
Class MaxRunningAppsEnforcer

java.lang.Object
  extended by org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.MaxRunningAppsEnforcer

public class MaxRunningAppsEnforcer
extends Object

Handles tracking and enforcement for user and queue maxRunningApps constraints


Constructor Summary
MaxRunningAppsEnforcer(FairScheduler scheduler)
           
 
Method Summary
 boolean canAppBeRunnable(FSQueue queue, String user)
          Checks whether making the application runnable would exceed any maxRunningApps limits.
 void trackNonRunnableApp(FSSchedulerApp app)
          Tracks the given new non runnable app so that it can be made runnable when it would not violate max running app limits.
 void trackRunnableApp(FSSchedulerApp app)
          Tracks the given new runnable app for purposes of maintaining max running app limits.
 void untrackNonRunnableApp(FSSchedulerApp app)
          Stops tracking the given non-runnable app
 void updateRunnabilityOnAppRemoval(FSSchedulerApp app)
          Updates the relevant tracking variables after a runnable app with the given queue and user has been removed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxRunningAppsEnforcer

public MaxRunningAppsEnforcer(FairScheduler scheduler)
Method Detail

canAppBeRunnable

public boolean canAppBeRunnable(FSQueue queue,
                                String user)
Checks whether making the application runnable would exceed any maxRunningApps limits.


trackRunnableApp

public void trackRunnableApp(FSSchedulerApp app)
Tracks the given new runnable app for purposes of maintaining max running app limits.


trackNonRunnableApp

public void trackNonRunnableApp(FSSchedulerApp app)
Tracks the given new non runnable app so that it can be made runnable when it would not violate max running app limits.


updateRunnabilityOnAppRemoval

public void updateRunnabilityOnAppRemoval(FSSchedulerApp app)
Updates the relevant tracking variables after a runnable app with the given queue and user has been removed. Checks to see whether any other applications are now runnable 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.


untrackNonRunnableApp

public void untrackNonRunnableApp(FSSchedulerApp app)
Stops tracking the given non-runnable app



Copyright © 2014 Apache Software Foundation. All Rights Reserved.