diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index b1d5ec4a550..f9801944da1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -126,6 +126,8 @@ Release 2.7.0 - UNRELEASED HDFS-7263. Snapshot read can reveal future bytes for appended files. (Tao Luo via shv) + HDFS-7315. DFSTestUtil.readFileBuffer opens extra FSDataInputStream. + (Plamen Jeliazkov via wheat9) Release 2.6.0 - UNRELEASED diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java index c728b2ba846..31ef8b2c824 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java @@ -271,7 +271,7 @@ public class DFSTestUtil { try { FSDataInputStream in = fs.open(fileName); try { - IOUtils.copyBytes(fs.open(fileName), os, 1024, true); + IOUtils.copyBytes(in, os, 1024, true); return os.toByteArray(); } finally { in.close();