You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ps...@apache.org on 2022/08/11 15:16:30 UTC

[hbase] branch master updated: HBASE-27281 Add default implementation for Connection$getClusterId (#4683)

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

psomogyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new 39b496e1916 HBASE-27281 Add default implementation for Connection$getClusterId (#4683)
39b496e1916 is described below

commit 39b496e1916aaf514de5eaefbc68e1801c8d968e
Author: Peter Somogyi <ps...@apache.org>
AuthorDate: Thu Aug 11 17:16:23 2022 +0200

    HBASE-27281 Add default implementation for Connection$getClusterId (#4683)
    
    Signed-off-by: Duo Zhang <zh...@apache.org>
---
 .../src/main/java/org/apache/hadoop/hbase/client/Connection.java | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Connection.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Connection.java
index b26e4d1bb43..8220189d9b5 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Connection.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Connection.java
@@ -180,8 +180,13 @@ public interface Connection extends Abortable, Closeable {
    */
   AsyncConnection toAsyncConnection();
 
-  /** Returns the cluster ID unique to this HBase cluster. */
-  String getClusterId();
+  /**
+   * Returns the cluster ID unique to this HBase cluster. <br>
+   * The default implementation is added to keep client compatibility.
+   */
+  default String getClusterId() {
+    return null;
+  }
 
   /**
    * Retrieve an Hbck implementation to fix an HBase cluster. The returned Hbck is not guaranteed to