hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weic...@apache.org
Subject [hadoop] branch branch-3.2 updated: HADOOP-16126. ipc.Client.stop() may sleep too long to wait for all connections.
Date Wed, 02 Oct 2019 23:34:53 GMT
This is an automated email from the ASF dual-hosted git repository.

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


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

commit 824f71788239514312dfc58edcccaebaaf606606
Author: Tsz Wo Nicholas Sze <szetszwo@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


Mime
View raw message