Return-Path: X-Original-To: apmail-hadoop-common-commits-archive@www.apache.org Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 66C61181E6 for ; Tue, 16 Jun 2015 18:41:26 +0000 (UTC) Received: (qmail 4151 invoked by uid 500); 16 Jun 2015 18:41:21 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 3905 invoked by uid 500); 16 Jun 2015 18:41:21 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 3225 invoked by uid 99); 16 Jun 2015 18:41:20 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jun 2015 18:41:20 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id BC7E9E3C51; Tue, 16 Jun 2015 18:41:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: arp@apache.org To: common-commits@hadoop.apache.org Date: Tue, 16 Jun 2015 18:41:33 -0000 Message-Id: <9217fc9762194bc4a038218258a7e839@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [14/50] [abbrv] hadoop git commit: HADOOP-12052 IPC client downgrades all exception types to IOE, breaks callers trying to use them. (Brahma Reddy Battula via stevel) 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/18f68097 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/18f68097 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/18f68097 Branch: refs/heads/HDFS-7240 Commit: 18f680977684710037c07bb068383791e8a33a9e Parents: 126321e Author: Steve Loughran Authored: Mon Jun 8 13:02:26 2015 +0100 Committer: Steve Loughran Committed: Mon Jun 8 13:02:56 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/18f68097/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 eacc3be..79f3178 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -834,6 +834,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/18f68097/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 feb811e..6996a51 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;