HBASE-25903 ReadOnlyZKClient APIs - CompletableFuture.get() calls can cause threads to hang forver when ZK client create throws Non IOException (#3293)

Signed-off-by: zhangduo <zhangduo@apache.org>
This commit is contained in:
Anoop Sam John 2021-05-31 11:37:40 +05:30
parent 97e66a8af6
commit 1972261826
1 changed files with 3 additions and 3 deletions

View File

@ -86,7 +86,7 @@ public final class ReadOnlyZKClient implements Closeable {
public void exec(ZooKeeper zk) {
}
public void connectFailed(IOException e) {
public void connectFailed(Exception e) {
}
public void closed(IOException e) {
@ -233,7 +233,7 @@ public final class ReadOnlyZKClient implements Closeable {
}
@Override
public void connectFailed(IOException e) {
public void connectFailed(Exception e) {
if (delay(retryIntervalMs, maxRetries)) {
LOG.warn("{} to {} failed to connect to zk fo {} of {}, retries = {}", getId(),
connectString, operationType, path, retries, e);
@ -341,7 +341,7 @@ public final class ReadOnlyZKClient implements Closeable {
ZooKeeper zk;
try {
zk = getZk();
} catch (IOException e) {
} catch (Exception e) {
task.connectFailed(e);
continue;
}