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

This commit is contained in:
zhangduo 2017-11-21 21:22:13 +08:00
parent 13209bce06
commit 4df2dffbab
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> {