hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [1/2] hadoop git commit: HADOOP-12052 IPC client downgrades all exception types to IOE, breaks callers trying to use them. (Brahma Reddy Battula via stevel)
Date Mon, 08 Jun 2015 12:03:08 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 8c643e3bf -> c3c2b4d31
  refs/heads/trunk 126321ede -> 18f680977


HADOOP-12052 IPC client downgrades all exception types to IOE, breaks callers trying to use
them. (Brahma Reddy Battula via stevel)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/c3c2b4d3
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/c3c2b4d3
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/c3c2b4d3

Branch: refs/heads/branch-2
Commit: c3c2b4d3182bea3b4ee065168844c83f5114edcf
Parents: 8c643e3
Author: Steve Loughran <stevel@apache.org>
Authored: Mon Jun 8 13:02:26 2015 +0100
Committer: Steve Loughran <stevel@apache.org>
Committed: Mon Jun 8 13:02:26 2015 +0100

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt              | 3 +++
 .../src/main/java/org/apache/hadoop/ipc/Client.java          | 8 +++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/c3c2b4d3/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 2bdfcdf..6b93e54 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -350,6 +350,9 @@ Release 2.8.0 - UNRELEASED
     HADOOP-11924. Tolerate JDK-8047340-related exceptions in
     Shell#isSetSidAvailable preventing class init. (Tsuyoshi Ozawa via gera)
 
+    HADOOP-12052 IPC client downgrades all exception types to IOE, breaks
+    callers trying to use them. (Brahma Reddy Battula via stevel)
+
 Release 2.7.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/c3c2b4d3/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
index 4b4166a..8062dd6 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
@@ -1484,7 +1484,13 @@ public class Client {
           }
         });
       } catch (ExecutionException e) {
-        throw new IOException(e);
+        Throwable cause = e.getCause();
+        // the underlying exception should normally be IOException
+        if (cause instanceof IOException) {
+          throw (IOException) cause;
+        } else {
+          throw new IOException(cause);
+        }
       }
       if (connection.addCall(call)) {
         break;


Mime
View raw message