Class CSMaxRunningAppsEnforcer
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSMaxRunningAppsEnforcer
Handles tracking and enforcement for user and queue maxRunningApps
constraints.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether making the application runnable would exceed any maxRunningApps limits.voidtrackApp(FiCaSchedulerApp app) voidvoidChecks to see whether any other applications runnable now that the given application has been removed from the given queue.voidThis 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.
-
Constructor Details
-
CSMaxRunningAppsEnforcer
-
-
Method Details
-
checkRunnabilityWithUpdate
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
-
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
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
-