HADOOP-11101. How about inputstream close statement from catch block to finally block in FileContext#copy() ( Contributed by skrho )

This commit is contained in:
Vinayakumar B 2014-09-25 12:46:47 +05:30
parent 428a76663a
commit dff95f7af8
2 changed files with 4 additions and 2 deletions

View File

@ -545,6 +545,9 @@ Release 2.6.0 - UNRELEASED
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
HADOOP-10838. Byte array native checksumming. (James Thomas via todd)

View File

@ -2021,10 +2021,9 @@ public boolean copy(final Path src, final Path dst, boolean deleteSource,
EnumSet.of(CreateFlag.CREATE);
out = create(qDst, createFlag);
IOUtils.copyBytes(in, out, conf, true);
} catch (IOException e) {
} finally {
IOUtils.closeStream(out);
IOUtils.closeStream(in);
throw e;
}
}
if (deleteSource) {