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 fe8cf32493
commit 31612ed64d
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

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