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:
parent
c91829bb41
commit
89b7b5a7f9
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue