diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 41fdb4f2958..18270f68ca1 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -285,6 +285,9 @@ Release 2.7.0 - UNRELEASED MAPREDUCE-6166. Reducers do not validate checksum of map outputs when fetching directly to disk. (Eric Payne via gera) + MAPREDUCE-6045. need close the DataInputStream after open it in + TestMapReduce.java (zxu via rkanter) + Release 2.6.0 - 2014-11-18 INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestMapReduce.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestMapReduce.java index 48ad47af220..912f0e352f7 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestMapReduce.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestMapReduce.java @@ -465,11 +465,15 @@ public class TestMapReduce { private static boolean isSequenceFile(FileSystem fs, Path f) throws IOException { DataInputStream in = fs.open(f); - byte[] seq = "SEQ".getBytes(); - for(int i=0; i < seq.length; ++i) { - if (seq[i] != in.read()) { - return false; + try { + byte[] seq = "SEQ".getBytes(); + for (int i = 0; i < seq.length; ++i) { + if (seq[i] != in.read()) { + return false; + } } + } finally { + in.close(); } return true; }