hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aengin...@apache.org
Subject [46/50] hadoop git commit: YARN-3760. FSDataOutputStream leak in AggregatedLogFormat.LogWriter.close(). Contributed by Haibo Chen.
Date Wed, 12 Apr 2017 23:42:33 GMT
YARN-3760. FSDataOutputStream leak in AggregatedLogFormat.LogWriter.close(). Contributed by
Haibo Chen.

(cherry picked from commit c26ccf1adb3a72df3f68e1150b86b813c691203a)


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

Branch: refs/heads/HDFS-7240
Commit: 9d9087a67ad599e678948d5c1036e51cb8cf5e3a
Parents: a731271
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 13:43:18 2017 -0700

----------------------------------------------------------------------
 .../hadoop/yarn/logaggregation/AggregatedLogFormat.java  | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/9d9087a6/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 8d86967..0aa318c 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
@@ -541,14 +541,15 @@ public class AggregatedLogFormat {
 
     @Override
     public void close() {
-      if (writer != null) {
-        try {
+      try {
+        if (writer != null) {
           writer.close();
-        } catch (IOException e) {
-          LOG.warn("Exception closing writer", e);
         }
+      } 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