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

View File

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