HBASE-24972 Wait for connection attempt to succeed before performing operations on ZK
This commit is contained in:
parent
686b72c44e
commit
1554faa3a5
|
@ -135,6 +135,7 @@ public class RecoverableZooKeeper {
|
|||
if (this.zk == null) {
|
||||
try {
|
||||
this.zk = new ZooKeeper(quorumServers, sessionTimeout, watcher);
|
||||
ZooKeeperHelper.ensureConnectedZooKeeper(this.zk, 30000);
|
||||
} catch (IOException ex) {
|
||||
LOG.warn("Unable to create ZooKeeper Connection", ex);
|
||||
throw new KeeperException.OperationTimeoutException();
|
||||
|
|
Loading…
Reference in New Issue