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

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


The following commit(s) were added to refs/heads/branch-2.5 by this push:
     new ef9769a9084 HBASE-28501 Support non-SPNEGO authentication methods and 
implement session handling in REST java client library (addendum: revert 
incompatible API change) (#5928)
ef9769a9084 is described below

commit ef9769a9084dc16c33bc9dba7e0daa5be7dcacc0
Author: Istvan Toth <st...@apache.org>
AuthorDate: Tue May 21 09:04:13 2024 +0200

    HBASE-28501 Support non-SPNEGO authentication methods and implement session 
handling in REST java client library (addendum: revert incompatible API change) 
(#5928)
    
    Signed-off-by: Duo Zhang <zhang...@apache.org>
---
 .../apache/hadoop/hbase/rest/client/Client.java    | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git 
a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java 
b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java
index a7df571fb2f..620497d08ba 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java
@@ -185,7 +185,7 @@ public class Client {
   /**
    * Constructor This constructor will create an object using the old faulty 
load balancing logic.
    * When specifying multiple servers in the cluster object, it is highly 
recommended to call
-   * setSticky() on the created client, or use one of the preferred 
constructors instead.
+   * setSticky() on the created client, or use the preferred constructor 
instead.
    * @param cluster the cluster definition
    */
   public Client(Cluster cluster) {
@@ -195,7 +195,7 @@ public class Client {
   /**
    * Constructor This constructor will create an object using the old faulty 
load balancing logic.
    * When specifying multiple servers in the cluster object, it is highly 
recommended to call
-   * setSticky() on the created client, or use one of the preferred 
constructors instead.
+   * setSticky() on the created client, or use the preferred constructor 
instead.
    * @param cluster    the cluster definition
    * @param sslEnabled enable SSL or not
    */
@@ -207,7 +207,7 @@ public class Client {
   /**
    * Constructor This constructor will create an object using the old faulty 
load balancing logic.
    * When specifying multiple servers in the cluster object, it is highly 
recommended to call
-   * setSticky() on the created client, or use one of the preferred 
constructors instead.
+   * setSticky() on the created client, or use the preferred constructor 
instead.
    * @param cluster    the cluster definition
    * @param conf       Configuration
    * @param sslEnabled enable SSL or not
@@ -221,7 +221,7 @@ public class Client {
    * Constructor, allowing to define custom trust store (only for SSL 
connections) This constructor
    * will create an object using the old faulty load balancing logic. When 
specifying multiple
    * servers in the cluster object, it is highly recommended to call 
setSticky() on the created
-   * client, or use one of the preferred constructors instead.
+   * client, or use the preferred constructor instead.
    * @param cluster            the cluster definition
    * @param trustStorePath     custom trust store to use for SSL connections
    * @param trustStorePassword password to use for custom trust store
@@ -230,8 +230,7 @@ public class Client {
    */
   public Client(Cluster cluster, String trustStorePath, Optional<String> 
trustStorePassword,
     Optional<String> trustStoreType) {
-    this(cluster, HBaseConfiguration.create(), true, trustStorePath, 
trustStorePassword,
-      trustStoreType);
+    this(cluster, HBaseConfiguration.create(), trustStorePath, 
trustStorePassword, trustStoreType);
   }
 
   /**
@@ -255,9 +254,10 @@ public class Client {
   }
 
   /**
-   * Constructor, allowing to define custom trust store (only for SSL 
connections) This constructor
-   * also enables sticky mode. This is a preferred constructor when not using 
BASIC or JWT
-   * authentication. Clients created by this will use the old faulty load 
balancing logic.
+   * Constructor, allowing to define custom trust store (only for SSL 
connections). This constructor
+   * will create an object using the old faulty load balancing logic. When 
specifying multiple
+   * servers in the cluster object, it is highly recommended to call 
setSticky() on the created
+   * client, or use the preferred constructor instead.
    * @param cluster            the cluster definition
    * @param conf               HBase/Hadoop Configuration
    * @param trustStorePath     custom trust store to use for SSL connections
@@ -265,10 +265,10 @@ public class Client {
    * @param trustStoreType     type of custom trust store
    * @throws ClientTrustStoreInitializationException if the trust store file 
can not be loaded
    */
-  public Client(Cluster cluster, Configuration conf, boolean sslEnabled, 
String trustStorePath,
+  public Client(Cluster cluster, Configuration conf, String trustStorePath,
     Optional<String> trustStorePassword, Optional<String> trustStoreType) {
     KeyStore trustStore = loadTruststore(trustStorePath, trustStorePassword, 
trustStoreType);
-    initialize(cluster, conf, sslEnabled, false, Optional.of(trustStore), 
Optional.empty(),
+    initialize(cluster, conf, true, false, Optional.of(trustStore), 
Optional.empty(),
       Optional.empty(), Optional.empty());
   }
 

Reply via email to