YARN-10430. Log improvements in NodeStatusUpdaterImpl. Contributed by Bilwa S T.

(cherry picked from commit 90894ea641)
This commit is contained in:
Jim Brennan 2020-09-14 21:19:14 +00:00
parent 0731c8b5d0
commit 0ec21b9667

View File

@ -405,10 +405,10 @@ nodeManagerVersionId, containerReports, getRunningApplications(),
List<LogAggregationReport> logAggregationReports =
context.getNMLogAggregationStatusTracker()
.pullCachedLogAggregationReports();
LOG.debug("The cache log aggregation status size:{}",
logAggregationReports.size());
if (logAggregationReports != null
&& !logAggregationReports.isEmpty()) {
LOG.debug("The cache log aggregation status size:{}",
logAggregationReports.size());
request.setLogAggregationReportsForApps(logAggregationReports);
}
}
@ -623,8 +623,10 @@ protected List<ContainerStatus> getContainerStatuses() throws IOException {
}
containerStatuses.addAll(pendingCompletedContainers.values());
LOG.debug("Sending out {} container statuses: {}",
containerStatuses.size(), containerStatuses);
if (!containerStatuses.isEmpty()) {
LOG.debug("Sending out {} container statuses: {}",
containerStatuses.size(), containerStatuses);
}
return containerStatuses;
}
@ -663,8 +665,10 @@ private List<NMContainerStatus> getNMContainerStatuses() throws IOException {
addCompletedContainer(containerId);
}
}
LOG.info("Sending out " + containerStatuses.size()
+ " NM container statuses: " + containerStatuses);
if (!containerStatuses.isEmpty()) {
LOG.info("Sending out " + containerStatuses.size()
+ " NM container statuses: " + containerStatuses);
}
return containerStatuses;
}