You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by vj...@apache.org on 2020/06/05 15:09:47 UTC

[hbase] branch branch-1.4 updated: HBASE-24499 Use a client property for SaslConnection MAX_ATTEMPTS (#1857)

This is an automated email from the ASF dual-hosted git repository.

vjasani pushed a commit to branch branch-1.4
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1.4 by this push:
     new 6fd3735  HBASE-24499 Use a client property for SaslConnection MAX_ATTEMPTS (#1857)
6fd3735 is described below

commit 6fd3735c72957e58977c0004205858659190b9aa
Author: Ravi Kishore Valeti <v....@gmail.com>
AuthorDate: Fri Jun 5 20:13:08 2020 +0530

    HBASE-24499 Use a client property for SaslConnection MAX_ATTEMPTS (#1857)
    
    Signed-off-by: Duo Zhang <zh...@apache.org>
    Signed-off-by: Jan Hentschel <ja...@ultratendency.com>
    Signed-off-by: Viraj Jasani <vj...@apache.org>
---
 .../main/java/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 d5cf6a2..25dab2a 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) {