YARN-1297. FairScheduler: Move some logs to debug and check if debug logging is enabled
This commit is contained in:
parent
a5fed8bbfe
commit
4b1dcbbe0c
|
@ -435,7 +435,10 @@ public class RMContainerImpl implements RMContainer, Comparable<RMContainer> {
|
|||
|
||||
@Override
|
||||
public void handle(RMContainerEvent event) {
|
||||
LOG.debug("Processing " + event.getContainerId() + " of type " + event.getType());
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Processing " + event.getContainerId() + " of type " + event
|
||||
.getType());
|
||||
}
|
||||
try {
|
||||
writeLock.lock();
|
||||
RMContainerState oldState = getState();
|
||||
|
|
|
@ -154,12 +154,14 @@ public abstract class SchedulerNode {
|
|||
|
||||
launchedContainers.put(container.getId(), rmContainer);
|
||||
|
||||
LOG.info("Assigned container " + container.getId() + " of capacity "
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Assigned container " + container.getId() + " of capacity "
|
||||
+ container.getResource() + " on host " + rmNode.getNodeAddress()
|
||||
+ ", which has " + numContainers + " containers, "
|
||||
+ getAllocatedResource() + " used and " + getUnallocatedResource()
|
||||
+ " available after allocation");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the resources allocated for a container.
|
||||
|
@ -175,12 +177,14 @@ public abstract class SchedulerNode {
|
|||
addUnallocatedResource(deltaResource);
|
||||
}
|
||||
|
||||
LOG.info((increase ? "Increased" : "Decreased") + " container "
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug((increase ? "Increased" : "Decreased") + " container "
|
||||
+ containerId + " of capacity " + deltaResource + " on host "
|
||||
+ rmNode.getNodeAddress() + ", which has " + numContainers
|
||||
+ " containers, " + getAllocatedResource() + " used and "
|
||||
+ getUnallocatedResource() + " available after allocation");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Increase the resources allocated to a container.
|
||||
|
@ -261,12 +265,14 @@ public abstract class SchedulerNode {
|
|||
updateResource(container);
|
||||
}
|
||||
|
||||
LOG.info("Released container " + container.getId() + " of capacity "
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Released container " + container.getId() + " of capacity "
|
||||
+ container.getResource() + " on host " + rmNode.getNodeAddress()
|
||||
+ ", which currently has " + numContainers + " containers, "
|
||||
+ getAllocatedResource() + " used and " + getUnallocatedResource()
|
||||
+ " available" + ", release resources=" + true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add unallocated resources to the node. This is used when unallocating a
|
||||
|
|
|
@ -138,8 +138,10 @@ public class FSAppAttempt extends SchedulerApplicationAttempt
|
|||
containerStatus,
|
||||
event)
|
||||
);
|
||||
LOG.info("Completed container: " + rmContainer.getContainerId() +
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Completed container: " + rmContainer.getContainerId() +
|
||||
" in state: " + rmContainer.getState() + " event:" + event);
|
||||
}
|
||||
|
||||
// Remove from the list of containers
|
||||
liveContainers.remove(rmContainer.getContainerId());
|
||||
|
|
|
@ -494,10 +494,12 @@ public class FairScheduler extends
|
|||
// TODO: Not sure if this ever actually adds this to the list of cleanup
|
||||
// containers on the RMNode (see SchedulerNode.releaseContainer()).
|
||||
super.completedContainer(container, status, RMContainerEventType.KILL);
|
||||
LOG.info("Killing container" + container +
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Killing container" + container +
|
||||
" (after waiting for preemption for " +
|
||||
(getClock().getTime() - time) + "ms)");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// track the request in the FSAppAttempt itself
|
||||
app.addPreemption(container, getClock().getTime());
|
||||
|
@ -869,10 +871,12 @@ public class FairScheduler extends
|
|||
updateRootQueueMetrics();
|
||||
}
|
||||
|
||||
LOG.info("Application attempt " + application.getApplicationAttemptId()
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Application attempt " + application.getApplicationAttemptId()
|
||||
+ " released container " + container.getId() + " on node: " + node
|
||||
+ " with event: " + event);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void addNode(List<NMContainerStatus> containerReports,
|
||||
RMNode node) {
|
||||
|
|
Loading…
Reference in New Issue