public class MaxRunningAppsEnforcer extends Object
Constructor and Description |
---|
MaxRunningAppsEnforcer(FairScheduler scheduler) |
Modifier and Type | Method and Description |
---|---|
boolean |
canAppBeRunnable(FSQueue queue,
String user)
Checks whether making the application runnable would exceed any
maxRunningApps limits.
|
void |
trackNonRunnableApp(FSAppAttempt 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(FSAppAttempt app)
Tracks the given new runnable app for purposes of maintaining max running
app limits.
|
void |
untrackNonRunnableApp(FSAppAttempt app)
Stops tracking the given non-runnable app
|
void |
untrackRunnableApp(FSAppAttempt app)
Updates the relevant tracking variables after a runnable app with the given
queue and user has been removed.
|
void |
updateRunnabilityOnAppRemoval(FSAppAttempt app,
FSLeafQueue queue)
Checks to see whether any other applications runnable now that the given
application has been removed from the given queue.
|
void |
updateRunnabilityOnReload()
This is called after reloading the allocation configuration when the
scheduler is reinitilized
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.
|
public MaxRunningAppsEnforcer(FairScheduler scheduler)
public boolean canAppBeRunnable(FSQueue queue, String user)
public void trackRunnableApp(FSAppAttempt app)
public void trackNonRunnableApp(FSAppAttempt app)
public void updateRunnabilityOnReload()
public void updateRunnabilityOnAppRemoval(FSAppAttempt app, FSLeafQueue queue)
public void untrackRunnableApp(FSAppAttempt app)
public void untrackNonRunnableApp(FSAppAttempt app)
Copyright © 2017 Apache Software Foundation. All Rights Reserved.