diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index ce1e065089a..d02c85741b7 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 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 d0e171e5567..84f28baf2ee 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; }