From 3c0a250e58ec643794a3c8df6dd9452c93ffaea3 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 46759a1d763..ba3d4cd5564 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 @@ -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) {