You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by su...@apache.org on 2014/09/25 22:52:19 UTC
[09/45] git commit: HADOOP-11101. How about inputstream close
statement from catch block to finally block in FileContext#copy() (
Contributed by skrho )
HADOOP-11101. How about inputstream close statement from catch block to finally block in FileContext#copy() ( Contributed by skrho )
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/dff95f7a
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/dff95f7a
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/dff95f7a
Branch: refs/heads/YARN-1051
Commit: dff95f7af899a4f2add791afbd20c8a1e33c7a36
Parents: 428a766
Author: Vinayakumar B <vi...@apache.org>
Authored: Thu Sep 25 12:46:47 2014 +0530
Committer: Vinayakumar B <vi...@apache.org>
Committed: Thu Sep 25 12:46:47 2014 +0530
----------------------------------------------------------------------
hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++
.../src/main/java/org/apache/hadoop/fs/FileContext.java | 3 +--
2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/dff95f7a/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index a4b3314..7bc77dd 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -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)
http://git-wip-us.apache.org/repos/asf/hadoop/blob/dff95f7a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
index c9c8fa8..d878d17 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
@@ -2021,10 +2021,9 @@ public final class FileContext {
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) {