From fedcce2f4c5f737b9fa480ac3ffdde6bb5d5cc89 Mon Sep 17 00:00:00 2001 From: Varun Saxena Date: Mon, 9 Jan 2017 11:17:19 +0530 Subject: [PATCH] YARN-6068. Log aggregation get failed when NM restart even with recovery (Junping Du via Varun Saxena) (cherry picked from commit f59e36b4ce71d3019ab91b136b6d7646316954e7) --- .../containermanager/logaggregation/AppLogAggregatorImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/AppLogAggregatorImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/AppLogAggregatorImpl.java index fa07c593c98..54606a6a38c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/AppLogAggregatorImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/AppLogAggregatorImpl.java @@ -513,8 +513,8 @@ public class AppLogAggregatorImpl implements AppLogAggregator { + appId, e); doAppLogAggregationPostCleanUp(); } finally { - if (!this.appAggregationFinished.get()) { - LOG.warn("Aggregation did not complete for application " + appId); + if (!this.appAggregationFinished.get() && !this.aborted.get()) { + LOG.warn("Log aggregation did not complete for application " + appId); this.dispatcher.getEventHandler().handle( new ApplicationEvent(this.appId, ApplicationEventType.APPLICATION_LOG_HANDLING_FAILED));