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 st...@apache.org on 2019/04/04 15:17:42 UTC

[hadoop] branch trunk updated: HADOOP-16208. Do Not Log InterruptedException in Client.

This is an automated email from the ASF dual-hosted git repository.

stevel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new c907363  HADOOP-16208. Do Not Log InterruptedException in Client.
c907363 is described below

commit c90736350ba158c7872a39426e7a29c5e5e0bb48
Author: David Mollitor <da...@cloudera.com>
AuthorDate: Thu Apr 4 16:15:57 2019 +0100

    HADOOP-16208. Do Not Log InterruptedException in Client.
    
    Contributed by David Mollitor.
---
 .../hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

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 0121967..3afa6d8 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
@@ -1445,10 +1445,12 @@ public class Client implements AutoCloseable {
         connection.sendRpcRequest(call);                 // send the rpc request
       } catch (RejectedExecutionException e) {
         throw new IOException("connection has been closed", e);
-      } catch (InterruptedException e) {
+      } catch (InterruptedException ie) {
         Thread.currentThread().interrupt();
-        LOG.warn("interrupted waiting to send rpc request to server", e);
-        throw new IOException(e);
+        IOException ioe = new InterruptedIOException(
+            "Interrupted waiting to send RPC request to server");
+        ioe.initCause(ie);
+        throw ioe;
       }
     } catch(Exception e) {
       if (isAsynchronousMode()) {


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org