From 30ebb792f927beeb92c7b5e6cdf1debbba2cead7 Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Tue, 15 Sep 2015 20:21:33 +0000 Subject: [PATCH] YARN-4158. Remove duplicate close for LogWriter in AppLogAggregatorImpl#uploadLogsForContainers. Contributed by Zhihai Xu (cherry picked from commit 8c1cdb17a03fec91bfab172fe92b67bdeb9ebfba) --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../containermanager/logaggregation/AppLogAggregatorImpl.java | 1 + 2 files changed, 4 insertions(+) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 0dcb6286115..a40d0a461ac 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -73,6 +73,9 @@ Release 2.7.2 - UNRELEASED YARN-4153. TestAsyncDispatcher failed at branch-2.7 (Zhihai Xu via jianhe) + YARN-4158. Remove duplicate close for LogWriter in + AppLogAggregatorImpl#uploadLogsForContainers (Zhihai Xu via jlowe) + Release 2.7.1 - 2015-07-06 INCOMPATIBLE CHANGES 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 c7ca666a84c..0de428839ba 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 @@ -290,6 +290,7 @@ public class AppLogAggregatorImpl implements AppLogAggregator { if (writer != null) { writer.close(); + writer = null; } final Path renamedPath = this.rollingMonitorInterval <= 0