YARN-10705. Misleading DEBUG log for container assignment needs to be removed when the container is actually reserved, not assigned in FairScheduler. Contributed by Siddharth Ahuja.

This commit is contained in:
Peter Bacsko 2021-04-23 17:38:34 +02:00
parent 3b6b21e459
commit 14a84c47b0
1 changed files with 13 additions and 3 deletions

View File

@ -352,9 +352,19 @@ public class FSLeafQueue extends FSQueue {
continue;
}
assigned = sched.assignContainer(node);
if (!assigned.equals(none())) {
LOG.debug("Assigned container in queue:{} container:{}",
getName(), assigned);
boolean isContainerAssignedOrReserved = !assigned.equals(none());
boolean isContainerReserved =
assigned.equals(FairScheduler.CONTAINER_RESERVED);
// check if an assignment or a reservation was made.
if (isContainerAssignedOrReserved) {
// only log container assignment if there was an actual allocation,
// not a reservation.
if (!isContainerReserved && LOG.isDebugEnabled()) {
LOG.debug("Assigned container in queue:{} container:{}",
getName(), assigned);
}
break;
}
}