HDFS-7315. DFSTestUtil.readFileBuffer opens extra FSDataInputStream. Contributed by Plamen Jeliazkov.
This commit is contained in:
parent
c7f81dad30
commit
3f030c04e8
@ -375,6 +375,9 @@ 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
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -267,7 +267,7 @@ public static byte[] readFileBuffer(FileSystem fs, Path fileName)
|
|||||||
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…
x
Reference in New Issue
Block a user