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 Viraj Jasani
parent 4853961b2c
commit cdab7b33f2
No known key found for this signature in database
GPG Key ID: 3AE697641452FC5D
1 changed files with 2 additions and 2 deletions

View File

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