HDFS-7315. DFSTestUtil.readFileBuffer opens extra FSDataInputStream. Contributed by Plamen Jeliazkov.

This commit is contained in:
Haohui Mai 2014-10-31 11:47:41 -07:00
parent c7f81dad30
commit 3f030c04e8
2 changed files with 4 additions and 1 deletions

View File

@ -375,6 +375,9 @@ 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
INCOMPATIBLE CHANGES

View File

@ -267,7 +267,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();