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 ta...@apache.org on 2019/03/01 09:04:38 UTC

[hadoop] branch branch-2.8 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.

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


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

commit 7352d2e86c0ecbb42af6ef02061140ba1f254ec4
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 79a43fd..cd7c74b 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
@@ -84,6 +84,7 @@ import static org.apache.hadoop.ipc.RpcConstants.PING_CALL_ID;
 public class Client implements AutoCloseable {
   
   public static final Log LOG = LogFactory.getLog(Client.class);
+  private static final int STOP_SLEEP_TIME_MS = 10;
 
   /** A counter for generating call IDs. */
   private static final AtomicInteger callIdCounter = new AtomicInteger();
@@ -1318,7 +1319,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