HADOOP-11101. How about inputstream close statement from catch block to finally block in FileContext#copy() ( Contributed by skrho )
This commit is contained in:
parent
428a76663a
commit
dff95f7af8
|
@ -545,6 +545,9 @@ Release 2.6.0 - UNRELEASED
|
||||||
|
|
||||||
HADOOP-11009. Add Timestamp Preservation to DistCp (Gary Steelman via aw)
|
HADOOP-11009. Add Timestamp Preservation to DistCp (Gary Steelman via aw)
|
||||||
|
|
||||||
|
HADOOP-11101. How about inputstream close statement from catch block to
|
||||||
|
finally block in FileContext#copy() ( skrho via vinayakumarb )
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HADOOP-10838. Byte array native checksumming. (James Thomas via todd)
|
HADOOP-10838. Byte array native checksumming. (James Thomas via todd)
|
||||||
|
|
|
@ -2021,10 +2021,9 @@ public final class FileContext {
|
||||||
EnumSet.of(CreateFlag.CREATE);
|
EnumSet.of(CreateFlag.CREATE);
|
||||||
out = create(qDst, createFlag);
|
out = create(qDst, createFlag);
|
||||||
IOUtils.copyBytes(in, out, conf, true);
|
IOUtils.copyBytes(in, out, conf, true);
|
||||||
} catch (IOException e) {
|
} finally {
|
||||||
IOUtils.closeStream(out);
|
IOUtils.closeStream(out);
|
||||||
IOUtils.closeStream(in);
|
IOUtils.closeStream(in);
|
||||||
throw e;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (deleteSource) {
|
if (deleteSource) {
|
||||||
|
|
Loading…
Reference in New Issue