diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java index 40f051babd6..5ea81f843e3 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java @@ -406,10 +406,10 @@ public class NodeStatusUpdaterImpl extends AbstractService implements List 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); } } @@ -624,8 +624,10 @@ public class NodeStatusUpdaterImpl extends AbstractService implements } 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; } @@ -664,8 +666,10 @@ public class NodeStatusUpdaterImpl extends AbstractService implements 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; }