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:07:44 UTC

[hbase] branch branch-1 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
in repository https://gitbox.apache.org/repos/asf/hbase.git


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

commit cdab7b33f2b3195e6763eca2f479a64fb9863a61
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 faf42e0..a62bd18 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) {