From 9a975b6769c4ab45ed6fd7365ab5b2ac39573033 Mon Sep 17 00:00:00 2001 From: Peter Somogyi Date: Thu, 11 Aug 2022 17:16:23 +0200 Subject: [PATCH] HBASE-27281 Add default implementation for Connection$getClusterId (#4683) Signed-off-by: Duo Zhang (cherry picked from commit b9a13eba67433971c4590e7f999ccbfefd6315a0) Change-Id: I39d1ef6a0e5ff6e0f62e5a1fc1b3e4a26843afdb --- .../java/org/apache/hadoop/hbase/client/Connection.java | 7 +++++-- 1 file changed, 5 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 c4a1bb871f4c..a0cb5a4cf230 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 @@ -172,9 +172,12 @@ default Table getTable(TableName tableName, ExecutorService pool) throws IOExcep TableBuilder getTableBuilder(TableName tableName, ExecutorService pool); /** - * @return the cluster ID unique to this HBase cluster. + * Returns the cluster ID unique to this HBase cluster.
+ * The default implementation is added to keep client compatibility. */ - String getClusterId(); + default String getClusterId() { + return null; + } /** * Retrieve an Hbck implementation to fix an HBase cluster. The returned Hbck is not guaranteed to