HBASE-27281 Add default implementation for Connection$getClusterId (#4683)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
Peter Somogyi 2022-08-11 17:16:23 +02:00
parent 73cf184a90
commit b9a13eba67
1 changed files with 7 additions and 2 deletions

View File

@ -171,8 +171,13 @@ public interface Connection extends Abortable, Closeable {
*/
TableBuilder getTableBuilder(TableName tableName, ExecutorService pool);
/** 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