hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From junping...@apache.org
Subject hadoop git commit: YARN-3760. FSDataOutputStream leak in AggregatedLogFormat.LogWriter.close(). Contributed by Haibo Chen.
Date Wed, 12 Apr 2017 21:19:26 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8.1 56814bbd5 -> e5c61a1a9


YARN-3760. FSDataOutputStream leak in AggregatedLogFormat.LogWriter.close(). Contributed by
Haibo Chen.

(cherry picked from commit c26ccf1adb3a72df3f68e1150b86b813c691203a)
(cherry picked from commit 9d9087a67ad599e678948d5c1036e51cb8cf5e3a)
(cherry picked from commit d77cada182ef805679dc79498d6b6cc6e7f6b6d4)
(cherry picked from commit c43ee00587e939ab5fdcfb9e717eb5948d12e6f8)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e5c61a1a
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e5c61a1a
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e5c61a1a

Branch: refs/heads/branch-2.8.1
Commit: e5c61a1a9eff54816e0c2f21d94fcc488808f55c
Parents: 56814bb
Author: Junping Du <junping_du@apache.org>
Authored: Wed Apr 12 09:34:34 2017 -0700
Committer: Junping Du <junping_du@apache.org>
Committed: Wed Apr 12 14:21:06 2017 -0700

----------------------------------------------------------------------
 .../yarn/logaggregation/AggregatedLogFormat.java       | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/e5c61a1a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/AggregatedLogFormat.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/AggregatedLogFormat.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/AggregatedLogFormat.java
index 5e4648a..38c1e6a 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/AggregatedLogFormat.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/AggregatedLogFormat.java
@@ -473,14 +473,15 @@ public class AggregatedLogFormat {
 
     @Override
     public void close() {
-      if (writer != null) {
-        try {
-          this.writer.close();
-        } catch (IOException e) {
-          LOG.warn("Exception closing writer", e);
+      try {
+        if (writer != null) {
+          writer.close();
         }
+      } catch (Exception e) {
+        LOG.warn("Exception closing writer", e);
+      } finally {
+        IOUtils.closeStream(this.fsDataOStream);
       }
-      IOUtils.closeStream(fsDataOStream);
     }
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message