if (exceedUserMaxApps(attempt.getUser())) {
attempt.updateAMContainerDiagnostics(AMState.INACTIVATED,
"The user \"" + attempt.getUser() + "\" has reached the maximum limit"
+ " of runnable applications.");
ret = false;
} else if (exceedQueueMaxRunningApps(queue)) {
attempt.updateAMContainerDiagnostics(AMState.INACTIVATED,
"The queue \"" + queue.getName() + "\" has reached the maximum limit"
+ " of runnable applications.");
ret = false;
}
在队列判断的过程中 会从子队列向上轮询到跟队列
public boolean exceedQueueMaxRunningApps(FSQueue queue) {
// Check queue and all parent queues
while (queue != null) {
if (queue.getNumRunnableApps() >= queue.getMaxRunningApps()) {
return true;
}
queue = queue.getParent();
}
return false;
}