public class MaxRunningAppsEnforcer
extends java.lang.Object
| Constructor | Description |
|---|---|
MaxRunningAppsEnforcer(FairScheduler scheduler) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
canAppBeRunnable(FSQueue queue,
FSAppAttempt attempt) |
Checks whether making the application runnable would exceed any
maxRunningApps limits.
|
boolean |
exceedQueueMaxRunningApps(FSQueue queue) |
Recursively checks whether the number of queue runnable apps exceeds the
limitation.
|
boolean |
exceedUserMaxApps(java.lang.String user) |
Checks whether the number of user runnable apps exceeds the limitation.
|
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 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.
|
public MaxRunningAppsEnforcer(FairScheduler scheduler)
public boolean canAppBeRunnable(FSQueue queue, FSAppAttempt attempt)
queue - the current queueattempt - the app attempt being checkedpublic boolean exceedUserMaxApps(java.lang.String user)
user - the user namepublic boolean exceedQueueMaxRunningApps(FSQueue queue)
queue - the current queuepublic void trackRunnableApp(FSAppAttempt app)
app - FSAppAttempt, the given application.public void trackNonRunnableApp(FSAppAttempt app)
app - FSAppAttempt, the given application.public void updateRunnabilityOnReload()
public void updateRunnabilityOnAppRemoval(FSAppAttempt app, FSLeafQueue queue)
queue - FSLeafQueue, the given queue.app - FSAppAttempt, the given application.public void untrackRunnableApp(FSAppAttempt app)
app - FSAppAttempt.public void untrackNonRunnableApp(FSAppAttempt app)
app - FSAppAttempt.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.