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 fe...@apache.org on 2021/07/23 04:56:53 UTC

[hadoop] branch branch-3.3 updated: HADOOP-17808. ipc.Client to set interrupt flag after catching InterruptedException (#3219)

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

ferhui pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.3 by this push:
     new 5ea1337  HADOOP-17808. ipc.Client to set interrupt flag after catching InterruptedException (#3219)
5ea1337 is described below

commit 5ea1337167ba3a927e6a6fae61b67f31eb604765
Author: Viraj Jasani <vj...@apache.org>
AuthorDate: Fri Jul 23 10:08:55 2021 +0530

    HADOOP-17808. ipc.Client to set interrupt flag after catching InterruptedException (#3219)
    
    (cherry picked from commit 3a52bfc5db1b13a71d5a5c6ee0cd689fb8b27895)
---
 .../hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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 4a0b5ae..0ea1c22 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
@@ -1051,7 +1051,10 @@ public class Client implements AutoCloseable {
         if (timeout>0) {
           try {
             wait(timeout);
-          } catch (InterruptedException e) {}
+          } catch (InterruptedException e) {
+            LOG.info("Interrupted while waiting to retrieve RPC response.", e);
+            Thread.currentThread().interrupt();
+          }
         }
       }
       
@@ -1383,6 +1386,9 @@ public class Client implements AutoCloseable {
         try {
           emptyCondition.wait();
         } catch (InterruptedException e) {
+          LOG.info("Interrupted while waiting on all connections to be closed.",
+              e);
+          Thread.currentThread().interrupt();
         }
       }
     }

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