|
@@ -684,9 +684,11 @@ public class LeafQueue extends AbstractCSQueue {
|
|
|
} else {
|
|
|
application.updateAMContainerDiagnostics(AMState.INACTIVATED,
|
|
|
CSAMContainerLaunchDiagnosticsConstants.QUEUE_AM_RESOURCE_LIMIT_EXCEED);
|
|
|
- LOG.info("Not activating application " + applicationId
|
|
|
- + " as amIfStarted: " + amIfStarted + " exceeds amLimit: "
|
|
|
- + amLimit);
|
|
|
+ if (LOG.isDebugEnabled()) {
|
|
|
+ LOG.debug("Not activating application " + applicationId
|
|
|
+ + " as amIfStarted: " + amIfStarted + " exceeds amLimit: "
|
|
|
+ + amLimit);
|
|
|
+ }
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
@@ -718,9 +720,11 @@ public class LeafQueue extends AbstractCSQueue {
|
|
|
} else {
|
|
|
application.updateAMContainerDiagnostics(AMState.INACTIVATED,
|
|
|
CSAMContainerLaunchDiagnosticsConstants.USER_AM_RESOURCE_LIMIT_EXCEED);
|
|
|
- LOG.info("Not activating application " + applicationId
|
|
|
- + " for user: " + user + " as userAmIfStarted: "
|
|
|
- + userAmIfStarted + " exceeds userAmLimit: " + userAMLimit);
|
|
|
+ if (LOG.isDebugEnabled()) {
|
|
|
+ LOG.debug("Not activating application " + applicationId
|
|
|
+ + " for user: " + user + " as userAmIfStarted: "
|
|
|
+ + userAmIfStarted + " exceeds userAmLimit: " + userAMLimit);
|
|
|
+ }
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
@@ -750,8 +754,17 @@ public class LeafQueue extends AbstractCSQueue {
|
|
|
applicationAttemptMap.put(application.getApplicationAttemptId(), application);
|
|
|
|
|
|
// Activate applications
|
|
|
- activateApplications();
|
|
|
-
|
|
|
+ if (Resources.greaterThan(resourceCalculator, lastClusterResource,
|
|
|
+ lastClusterResource, Resources.none())) {
|
|
|
+ activateApplications();
|
|
|
+ } else {
|
|
|
+ application.updateAMContainerDiagnostics(AMState.INACTIVATED,
|
|
|
+ CSAMContainerLaunchDiagnosticsConstants.CLUSTER_RESOURCE_EMPTY);
|
|
|
+ LOG.info("Skipping activateApplications for "
|
|
|
+ + application.getApplicationAttemptId()
|
|
|
+ + " since cluster resource is " + Resources.none());
|
|
|
+ }
|
|
|
+
|
|
|
LOG.info("Application added -" +
|
|
|
" appId: " + application.getApplicationId() +
|
|
|
" user: " + application.getUser() + "," +
|