From 877d0d3822e499d59242c4f519751bab4ddf961c Mon Sep 17 00:00:00 2001 From: Peter Somogyi Date: Mon, 8 Aug 2022 13:24:03 +0200 Subject: [PATCH 1/2] HBASE-27281 Add default implementation for Connection$getClusterId --- .../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 b26e4d1bb43b..21e9e02c20bd 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 @@ default BufferedMutator getBufferedMutator(TableName tableName) throws IOExcepti */ AsyncConnection toAsyncConnection(); - /** Returns the cluster ID unique to this HBase cluster. */ - String getClusterId(); + /** + * Returns the cluster ID unique to this HBase cluster.
+ * 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 From 5c283681394bb1145faba5fc54623e201f86de57 Mon Sep 17 00:00:00 2001 From: Peter Somogyi Date: Thu, 11 Aug 2022 16:27:22 +0200 Subject: [PATCH 2/2] javadoc format fix --- .../main/java/org/apache/hadoop/hbase/client/Connection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 21e9e02c20bd..8220189d9b51 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 @@ -183,7 +183,7 @@ default BufferedMutator getBufferedMutator(TableName tableName) throws IOExcepti /** * Returns the cluster ID unique to this HBase cluster.
* The default implementation is added to keep client compatibility. - * */ + */ default String getClusterId() { return null; }