Skip to content

Commit 39b496e

Browse files
authored
HBASE-27281 Add default implementation for Connection$getClusterId (#4683)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
1 parent bffae99 commit 39b496e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

hbase-client/src/main/java/org/apache/hadoop/hbase/client/Connection.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,13 @@ default BufferedMutator getBufferedMutator(TableName tableName) throws IOExcepti
180180
*/
181181
AsyncConnection toAsyncConnection();
182182

183-
/** Returns the cluster ID unique to this HBase cluster. */
184-
String getClusterId();
183+
/**
184+
* Returns the cluster ID unique to this HBase cluster. <br>
185+
* The default implementation is added to keep client compatibility.
186+
*/
187+
default String getClusterId() {
188+
return null;
189+
}
185190

186191
/**
187192
* Retrieve an Hbck implementation to fix an HBase cluster. The returned Hbck is not guaranteed to

0 commit comments

Comments
 (0)