Skip to content

Commit 3f5076d

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

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
@@ -171,8 +171,13 @@ default Table getTable(TableName tableName, ExecutorService pool) throws IOExcep
171171
*/
172172
TableBuilder getTableBuilder(TableName tableName, ExecutorService pool);
173173

174-
/** Returns the cluster ID unique to this HBase cluster. */
175-
String getClusterId();
174+
/**
175+
* Returns the cluster ID unique to this HBase cluster. <br>
176+
* The default implementation is added to keep client compatibility.
177+
*/
178+
default String getClusterId() {
179+
return null;
180+
}
176181

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

0 commit comments

Comments
 (0)