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
4853961b2c
commit
cdab7b33f2
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue