This is an automated email from the ASF dual-hosted git repository.
mcvsubbu pushed a commit to branch increase-wait-time
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/increase-wait-time by this
push:
new 32038b2 Give the zk server some time to start before trying to
connect to it
32038b2 is described below
commit 32038b2c31902fc1292bc88a53feef092a618dc7
Author: Subbu Subramaniam <[email protected]>
AuthorDate: Sun Jun 30 10:43:22 2019 -0700
Give the zk server some time to start before trying to connect to it
---
.../src/main/java/org/apache/pinot/common/utils/ZkStarter.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/pinot-common/src/main/java/org/apache/pinot/common/utils/ZkStarter.java
b/pinot-common/src/main/java/org/apache/pinot/common/utils/ZkStarter.java
index 0941d19..f0c1faa 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/utils/ZkStarter.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/utils/ZkStarter.java
@@ -18,6 +18,7 @@
*/
package org.apache.pinot.common.utils;
+import com.google.common.util.concurrent.Uninterruptibles;
import java.io.File;
import java.io.IOException;
import java.net.InetSocketAddress;
@@ -161,6 +162,8 @@ public class ZkStarter {
}
}
}.start();
+ // Give the server some time to start before trying to connect to it.
+ Uninterruptibles.sleepUninterruptibly(500, TimeUnit.MILLISECONDS);
// Wait until the ZK server is started
ZkClient client = new ZkClient("localhost:" + port, 10000);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]