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 08:55:40 UTC
[hadoop] branch branch-2 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
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new 5bed24a HADOOP-16126. ipc.Client.stop() may sleep too long to wait for all connections.
5bed24a is described below
commit 5bed24ad5fe3b5500b8c4bbf00acbadd3f8e0f2d
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 2636adb..ed62c00 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();
@@ -1336,7 +1337,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