HBASE-19313 Call blockUntilConnected when constructing ZKAsyncRegistry(temporary workaround)

This commit is contained in:
zhangduo 2017-11-21 21:22:13 +08:00
parent 0e289a851b
commit 48cf4c7abe
1 changed files with 6 additions and 0 deletions

View File

@ -79,6 +79,12 @@ class ZKAsyncRegistry implements AsyncRegistry {
Threads.newDaemonThreadFactory(String.format("ZKClusterRegistry-0x%08x", hashCode())))
.build();
this.zk.start();
// TODO: temporary workaround for HBASE-19312, must be removed before 2.0.0 release!
try {
this.zk.blockUntilConnected();
} catch (InterruptedException e) {
return;
}
}
private interface CuratorEventProcessor<T> {