YARN-8985. Improve debug log in FSParentQueue when assigning container. (Contributed by Wilfred Spiegelenburg)

This commit is contained in:
Haibo Chen 2018-12-05 15:02:57 -08:00
parent 2bba329c14
commit b3c75c1f1d
1 changed files with 6 additions and 1 deletions

View File

@ -196,7 +196,8 @@ public class FSParentQueue extends FSQueue {
// If this queue is over its limit, reject // If this queue is over its limit, reject
if (!assignContainerPreCheck(node)) { if (!assignContainerPreCheck(node)) {
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {
LOG.debug("Assign container precheck on node " + node + " failed"); LOG.debug("Assign container precheck for queue " + getName() +
" on node " + node.getNodeName() + " failed");
} }
return assigned; return assigned;
} }
@ -212,6 +213,10 @@ public class FSParentQueue extends FSQueue {
TreeSet<FSQueue> sortedChildQueues = new TreeSet<>(policy.getComparator()); TreeSet<FSQueue> sortedChildQueues = new TreeSet<>(policy.getComparator());
readLock.lock(); readLock.lock();
try { try {
if (LOG.isDebugEnabled()) {
LOG.debug("Node " + node.getNodeName() + " offered to parent queue: " +
getName() + " visiting " + childQueues.size() + " children");
}
sortedChildQueues.addAll(childQueues); sortedChildQueues.addAll(childQueues);
for (FSQueue child : sortedChildQueues) { for (FSQueue child : sortedChildQueues) {
assigned = child.assignContainer(node); assigned = child.assignContainer(node);