hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jl...@apache.org
Subject hadoop git commit: MAPREDUCE-6528. Memory leak for HistoryFileManager.getJobSummary(). Contributed by Junping Du (cherry picked from commit 6344b6a7694c70f296392b6462dba452ff762109)
Date Fri, 30 Oct 2015 15:34:45 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.6 530b8a75c -> f3b9f5e3d


MAPREDUCE-6528. Memory leak for HistoryFileManager.getJobSummary(). Contributed by Junping
Du
(cherry picked from commit 6344b6a7694c70f296392b6462dba452ff762109)

Conflicts:

	hadoop-mapreduce-project/CHANGES.txt


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

Branch: refs/heads/branch-2.6
Commit: f3b9f5e3d0a2c69e6f867b2a59867b08c3593d10
Parents: 530b8a7
Author: Jason Lowe <jlowe@apache.org>
Authored: Fri Oct 30 15:34:14 2015 +0000
Committer: Jason Lowe <jlowe@apache.org>
Committed: Fri Oct 30 15:34:14 2015 +0000

----------------------------------------------------------------------
 hadoop-mapreduce-project/CHANGES.txt                   |  3 +++
 .../hadoop/mapreduce/v2/hs/HistoryFileManager.java     | 13 ++++++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/f3b9f5e3/hadoop-mapreduce-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt
index ce1e065..d02c857 100644
--- a/hadoop-mapreduce-project/CHANGES.txt
+++ b/hadoop-mapreduce-project/CHANGES.txt
@@ -16,6 +16,9 @@ Release 2.6.3 - UNRELEASED
     avoid FileNotFoundException causing HistoryFileInfo into MOVE_FAILED state.
     (zhihai xu via devaraj)
 
+    MAPREDUCE-6528. Memory leak for HistoryFileManager.getJobSummary()
+    (Junping Du via jlowe)
+
 Release 2.6.2 - 2015-10-21
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f3b9f5e3/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java
index d0e171e..84f28ba 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java
@@ -953,9 +953,16 @@ public class HistoryFileManager extends AbstractService {
 
   private String getJobSummary(FileContext fc, Path path) throws IOException {
     Path qPath = fc.makeQualified(path);
-    FSDataInputStream in = fc.open(qPath);
-    String jobSummaryString = in.readUTF();
-    in.close();
+    FSDataInputStream in = null;
+    String jobSummaryString = null;
+    try {
+      in = fc.open(qPath);
+      jobSummaryString = in.readUTF();
+    } finally {
+      if (in != null) {
+        in.close();
+      }
+    }
     return jobSummaryString;
   }
 


Mime
View raw message