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 we...@apache.org on 2019/10/02 23:34:52 UTC

[hadoop] branch branch-3.1 updated: HADOOP-16126. ipc.Client.stop() may sleep too long to wait for all connections.

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

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


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 8d71b50  HADOOP-16126. ipc.Client.stop() may sleep too long to wait for all connections.
8d71b50 is described below

commit 8d71b508abc289bbd2e1770cad1a5e143ce7b515
Author: Tsz Wo Nicholas Sze <sz...@apache.org>
AuthorDate: Mon Feb 25 13:15:28 2019 -0800

    HADOOP-16126. ipc.Client.stop() may sleep too long to wait for all connections.
    
    (cherry picked from commit 0edb0c51dc2c4ae2f353e260f01912e28033d70f)
---
 .../hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java      | 3 ++-
 1 file changed, 2 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 efd77a0..4ea1f419 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
@@ -86,6 +86,7 @@ import static org.apache.hadoop.ipc.RpcConstants.PING_CALL_ID;
 public class Client implements AutoCloseable {
   
   public static final Logger LOG = LoggerFactory.getLogger(Client.class);
+  private static final int STOP_SLEEP_TIME_MS = 10;
 
   /** A counter for generating call IDs. */
   private static final AtomicInteger callIdCounter = new AtomicInteger();
@@ -1353,7 +1354,7 @@ public class Client implements AutoCloseable {
     // wait until all connections are closed
     while (!connections.isEmpty()) {
       try {
-        Thread.sleep(100);
+        Thread.sleep(STOP_SLEEP_TIME_MS);
       } catch (InterruptedException e) {
       }
     }


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