HBASE-24499 Use a client property for SaslConnection MAX_ATTEMPTS (#1857)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
Ravi Kishore Valeti 2020-06-05 20:13:08 +05:30 committed by GitHub
parent c91829bb41
commit 89b7b5a7f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -453,7 +453,7 @@ class BlockingRpcConnection extends RpcConnection implements Runnable {
}
short numRetries = 0;
final short MAX_RETRIES = 5;
int reloginMaxRetries = this.rpcClient.conf.getInt("hbase.security.relogin.maxretries", 5);
while (true) {
setupConnection();
InputStream inStream = NetUtils.getInputStream(socket);
@ -478,7 +478,7 @@ class BlockingRpcConnection extends RpcConnection implements Runnable {
});
} catch (Exception ex) {
ExceptionUtil.rethrowIfInterrupt(ex);
handleSaslConnectionFailure(numRetries++, MAX_RETRIES, ex, ticket);
handleSaslConnectionFailure(numRetries++, reloginMaxRetries, ex, ticket);
continue;
}
if (continueSasl) {