From cdab7b33f2b3195e6763eca2f479a64fb9863a61 Mon Sep 17 00:00:00 2001 From: Ravi Kishore Valeti Date: Fri, 5 Jun 2020 20:13:08 +0530 Subject: [PATCH] HBASE-24499 Use a client property for SaslConnection MAX_ATTEMPTS (#1857) Signed-off-by: Duo Zhang Signed-off-by: Jan Hentschel Signed-off-by: Viraj Jasani --- .../org/apache/hadoop/hbase/ipc/BlockingRpcConnection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/BlockingRpcConnection.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/BlockingRpcConnection.java index faf42e024e9..a62bd18e0da 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/BlockingRpcConnection.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/BlockingRpcConnection.java @@ -432,7 +432,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); @@ -457,7 +457,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) {