YARN-1892. Improved some logs in the scheduler. Contributed by Jian He.

svn merge --ignore-ancestry -c 1587717 ../../trunk/


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1587718 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhijie Shen 2014-04-15 20:40:53 +00:00
parent d7583e206d
commit 7c7d00d779
5 changed files with 42 additions and 46 deletions

View File

@ -58,6 +58,8 @@ Release 2.4.1 - UNRELEASED
IMPROVEMENTS
YARN-1892. Improved some logs in the scheduler. (Jian He via zjshen)
OPTIMIZATIONS
BUG FIXES

View File

@ -343,10 +343,6 @@ public class NodeStatusUpdaterImpl extends AbstractService implements
+ ", " + nodeHealthStatus.getHealthReport());
}
List<ContainerStatus> containersStatuses = getContainerStatuses();
if (LOG.isDebugEnabled()) {
LOG.debug(this.nodeId + " sending out status for "
+ containersStatuses.size() + " containers");
}
NodeStatus nodeStatus =
NodeStatus.newInstance(nodeId, responseId, containersStatuses,
createKeepAliveApplicationList(), nodeHealthStatus);
@ -373,7 +369,8 @@ public class NodeStatusUpdaterImpl extends AbstractService implements
}
}
if (LOG.isDebugEnabled()) {
LOG.debug("Sending out container statuses: " + containerStatuses);
LOG.debug("Sending out " + containerStatuses.size()
+ " container statuses: " + containerStatuses);
}
return containerStatuses;
}

View File

@ -255,13 +255,15 @@ public class SchedulerApplicationAttempt {
this.reservedContainers.put(priority, reservedContainers);
}
reservedContainers.put(node.getNodeID(), rmContainer);
LOG.info("Application " + getApplicationId()
+ " reserved container " + rmContainer
+ " on node " + node + ", currently has " + reservedContainers.size()
+ " at priority " + priority
+ "; currentReservation " + currentReservation.getMemory());
if (LOG.isDebugEnabled()) {
LOG.debug("Application attempt " + getApplicationAttemptId()
+ " reserved container " + rmContainer + " on node " + node
+ ". This attempt currently has " + reservedContainers.size()
+ " reserved containers at priority " + priority
+ "; currentReservation " + currentReservation.getMemory());
}
return rmContainer;
}

View File

@ -107,8 +107,6 @@ public class LeafQueue implements CSQueue {
private final Resource maximumAllocation;
private final float minimumAllocationFactor;
private RMContainerTokenSecretManager containerTokenSecretManager;
private Map<String, User> users = new HashMap<String, User>();
private final QueueMetrics metrics;
@ -149,7 +147,6 @@ public class LeafQueue implements CSQueue {
Resources.ratio(resourceCalculator,
Resources.subtract(maximumAllocation, minimumAllocation),
maximumAllocation);
this.containerTokenSecretManager = cs.getContainerTokenSecretManager();
float capacity =
(float)cs.getConfiguration().getCapacity(getQueuePath()) / 100;
@ -560,7 +557,7 @@ public class LeafQueue implements CSQueue {
return queueName + ": " +
"capacity=" + capacity + ", " +
"absoluteCapacity=" + absoluteCapacity + ", " +
"usedResources=" + usedResources +
"usedResources=" + usedResources + ", " +
"usedCapacity=" + getUsedCapacity() + ", " +
"absoluteUsedCapacity=" + getAbsoluteUsedCapacity() + ", " +
"numApps=" + getNumApplications() + ", " +
@ -949,15 +946,16 @@ public class LeafQueue implements CSQueue {
Resources.add(usedResources, required),
clusterResource);
if (potentialNewCapacity > absoluteMaxCapacity) {
LOG.info(getQueueName() +
" usedResources: " + usedResources +
" clusterResources: " + clusterResource +
" currentCapacity " +
Resources.divide(resourceCalculator, clusterResource,
usedResources, clusterResource) +
" required " + required +
" potentialNewCapacity: " + potentialNewCapacity + " ( " +
" max-capacity: " + absoluteMaxCapacity + ")");
if (LOG.isDebugEnabled()) {
LOG.debug(getQueueName()
+ " usedResources: " + usedResources
+ " clusterResources: " + clusterResource
+ " currentCapacity "
+ Resources.divide(resourceCalculator, clusterResource,
usedResources, clusterResource) + " required " + required
+ " potentialNewCapacity: " + potentialNewCapacity + " ( "
+ " max-capacity: " + absoluteMaxCapacity + ")");
}
return false;
}
return true;
@ -1300,7 +1298,7 @@ public class LeafQueue implements CSQueue {
ResourceRequest request, NodeType type, RMContainer rmContainer) {
if (LOG.isDebugEnabled()) {
LOG.debug("assignContainers: node=" + node.getNodeName()
+ " application=" + application.getApplicationId().getId()
+ " application=" + application.getApplicationId()
+ " priority=" + priority.getPriority()
+ " request=" + request + " type=" + type);
}
@ -1352,14 +1350,10 @@ public class LeafQueue implements CSQueue {
allocatedContainer);
LOG.info("assignedContainer" +
" application=" + application.getApplicationId() +
" application attempt=" + application.getApplicationAttemptId() +
" container=" + container +
" containerId=" + container.getId() +
" queue=" + this +
" usedCapacity=" + getUsedCapacity() +
" absoluteUsedCapacity=" + getAbsoluteUsedCapacity() +
" used=" + usedResources +
" cluster=" + clusterResource);
" clusterResource=" + clusterResource);
return container.getResource();
} else {
@ -1367,13 +1361,11 @@ public class LeafQueue implements CSQueue {
reserve(application, priority, node, rmContainer, container);
LOG.info("Reserved container " +
" application=" + application.getApplicationId() +
" application attempt=" + application.getApplicationAttemptId() +
" resource=" + request.getCapability() +
" queue=" + this.toString() +
" usedCapacity=" + getUsedCapacity() +
" absoluteUsedCapacity=" + getAbsoluteUsedCapacity() +
" used=" + usedResources +
" cluster=" + clusterResource);
" node=" + node +
" clusterResource=" + clusterResource);
return request.getCapability();
}
@ -1440,11 +1432,7 @@ public class LeafQueue implements CSQueue {
application, container.getResource());
LOG.info("completedContainer" +
" container=" + container +
" resource=" + container.getResource() +
" queue=" + this +
" usedCapacity=" + getUsedCapacity() +
" absoluteUsedCapacity=" + getAbsoluteUsedCapacity() +
" used=" + usedResources +
" cluster=" + clusterResource);
}
}

View File

@ -231,12 +231,19 @@ public class FiCaSchedulerNode extends SchedulerNode {
" on node " + this);
}
LOG.info("Updated reserved container " +
reservedContainer.getContainer().getId() + " on node " +
this + " for application " + application);
if (LOG.isDebugEnabled()) {
LOG.debug("Updated reserved container "
+ reservedContainer.getContainer().getId() + " on node " + this
+ " for application attempt "
+ application.getApplicationAttemptId());
}
} else {
LOG.info("Reserved container " + reservedContainer.getContainer().getId() +
" on node " + this + " for application " + application);
if (LOG.isDebugEnabled()) {
LOG.debug("Reserved container "
+ reservedContainer.getContainer().getId() + " on node " + this
+ " for application attempt "
+ application.getApplicationAttemptId());
}
}
this.reservedContainer = reservedContainer;
}