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
|
@Override
|
||||||
public void handle(RMContainerEvent event) {
|
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 {
|
try {
|
||||||
writeLock.lock();
|
writeLock.lock();
|
||||||
RMContainerState oldState = getState();
|
RMContainerState oldState = getState();
|
||||||
|
|
|
@ -154,11 +154,13 @@ public abstract class SchedulerNode {
|
||||||
|
|
||||||
launchedContainers.put(container.getId(), rmContainer);
|
launchedContainers.put(container.getId(), rmContainer);
|
||||||
|
|
||||||
LOG.info("Assigned container " + container.getId() + " of capacity "
|
if (LOG.isDebugEnabled()) {
|
||||||
+ container.getResource() + " on host " + rmNode.getNodeAddress()
|
LOG.debug("Assigned container " + container.getId() + " of capacity "
|
||||||
+ ", which has " + numContainers + " containers, "
|
+ container.getResource() + " on host " + rmNode.getNodeAddress()
|
||||||
+ getAllocatedResource() + " used and " + getUnallocatedResource()
|
+ ", which has " + numContainers + " containers, "
|
||||||
+ " available after allocation");
|
+ getAllocatedResource() + " used and " + getUnallocatedResource()
|
||||||
|
+ " available after allocation");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -175,11 +177,13 @@ public abstract class SchedulerNode {
|
||||||
addUnallocatedResource(deltaResource);
|
addUnallocatedResource(deltaResource);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG.info((increase ? "Increased" : "Decreased") + " container "
|
if (LOG.isDebugEnabled()) {
|
||||||
+ containerId + " of capacity " + deltaResource + " on host "
|
LOG.debug((increase ? "Increased" : "Decreased") + " container "
|
||||||
+ rmNode.getNodeAddress() + ", which has " + numContainers
|
+ containerId + " of capacity " + deltaResource + " on host "
|
||||||
+ " containers, " + getAllocatedResource() + " used and "
|
+ rmNode.getNodeAddress() + ", which has " + numContainers
|
||||||
+ getUnallocatedResource() + " available after allocation");
|
+ " containers, " + getAllocatedResource() + " used and "
|
||||||
|
+ getUnallocatedResource() + " available after allocation");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -261,11 +265,13 @@ public abstract class SchedulerNode {
|
||||||
updateResource(container);
|
updateResource(container);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG.info("Released container " + container.getId() + " of capacity "
|
if (LOG.isDebugEnabled()) {
|
||||||
+ container.getResource() + " on host " + rmNode.getNodeAddress()
|
LOG.debug("Released container " + container.getId() + " of capacity "
|
||||||
+ ", which currently has " + numContainers + " containers, "
|
+ container.getResource() + " on host " + rmNode.getNodeAddress()
|
||||||
+ getAllocatedResource() + " used and " + getUnallocatedResource()
|
+ ", which currently has " + numContainers + " containers, "
|
||||||
+ " available" + ", release resources=" + true);
|
+ getAllocatedResource() + " used and " + getUnallocatedResource()
|
||||||
|
+ " available" + ", release resources=" + true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -135,12 +135,14 @@ public class FSAppAttempt extends SchedulerApplicationAttempt
|
||||||
rmContainer.handle(
|
rmContainer.handle(
|
||||||
new RMContainerFinishedEvent(
|
new RMContainerFinishedEvent(
|
||||||
containerId,
|
containerId,
|
||||||
containerStatus,
|
containerStatus,
|
||||||
event)
|
event)
|
||||||
);
|
);
|
||||||
LOG.info("Completed container: " + rmContainer.getContainerId() +
|
if (LOG.isDebugEnabled()) {
|
||||||
" in state: " + rmContainer.getState() + " event:" + event);
|
LOG.debug("Completed container: " + rmContainer.getContainerId() +
|
||||||
|
" in state: " + rmContainer.getState() + " event:" + event);
|
||||||
|
}
|
||||||
|
|
||||||
// Remove from the list of containers
|
// Remove from the list of containers
|
||||||
liveContainers.remove(rmContainer.getContainerId());
|
liveContainers.remove(rmContainer.getContainerId());
|
||||||
|
|
||||||
|
|
|
@ -494,9 +494,11 @@ public class FairScheduler extends
|
||||||
// TODO: Not sure if this ever actually adds this to the list of cleanup
|
// TODO: Not sure if this ever actually adds this to the list of cleanup
|
||||||
// containers on the RMNode (see SchedulerNode.releaseContainer()).
|
// containers on the RMNode (see SchedulerNode.releaseContainer()).
|
||||||
super.completedContainer(container, status, RMContainerEventType.KILL);
|
super.completedContainer(container, status, RMContainerEventType.KILL);
|
||||||
LOG.info("Killing container" + container +
|
if (LOG.isDebugEnabled()) {
|
||||||
" (after waiting for preemption for " +
|
LOG.debug("Killing container" + container +
|
||||||
(getClock().getTime() - time) + "ms)");
|
" (after waiting for preemption for " +
|
||||||
|
(getClock().getTime() - time) + "ms)");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// track the request in the FSAppAttempt itself
|
// track the request in the FSAppAttempt itself
|
||||||
|
@ -869,9 +871,11 @@ public class FairScheduler extends
|
||||||
updateRootQueueMetrics();
|
updateRootQueueMetrics();
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG.info("Application attempt " + application.getApplicationAttemptId()
|
if (LOG.isDebugEnabled()) {
|
||||||
+ " released container " + container.getId() + " on node: " + node
|
LOG.debug("Application attempt " + application.getApplicationAttemptId()
|
||||||
+ " with event: " + event);
|
+ " released container " + container.getId() + " on node: " + node
|
||||||
|
+ " with event: " + event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void addNode(List<NMContainerStatus> containerReports,
|
private synchronized void addNode(List<NMContainerStatus> containerReports,
|
||||||
|
|
Loading…
Reference in New Issue