HDFS-7315. DFSTestUtil.readFileBuffer opens extra FSDataInputStream. Contributed by Plamen Jeliazkov.
This commit is contained in:
parent
fe8cf32493
commit
31612ed64d
|
@ -126,6 +126,8 @@ Release 2.7.0 - UNRELEASED
|
||||||
HDFS-7263. Snapshot read can reveal future bytes for appended files.
|
HDFS-7263. Snapshot read can reveal future bytes for appended files.
|
||||||
(Tao Luo via shv)
|
(Tao Luo via shv)
|
||||||
|
|
||||||
|
HDFS-7315. DFSTestUtil.readFileBuffer opens extra FSDataInputStream.
|
||||||
|
(Plamen Jeliazkov via wheat9)
|
||||||
|
|
||||||
Release 2.6.0 - UNRELEASED
|
Release 2.6.0 - UNRELEASED
|
||||||
|
|
||||||
|
|
|
@ -271,7 +271,7 @@ public class DFSTestUtil {
|
||||||
try {
|
try {
|
||||||
FSDataInputStream in = fs.open(fileName);
|
FSDataInputStream in = fs.open(fileName);
|
||||||
try {
|
try {
|
||||||
IOUtils.copyBytes(fs.open(fileName), os, 1024, true);
|
IOUtils.copyBytes(in, os, 1024, true);
|
||||||
return os.toByteArray();
|
return os.toByteArray();
|
||||||
} finally {
|
} finally {
|
||||||
in.close();
|
in.close();
|
||||||
|
|
Loading…
Reference in New Issue