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 committed by GitHub
parent bffae99f40
commit 39b496e191
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -180,8 +180,13 @@ public interface Connection extends Abortable, Closeable {
*/
AsyncConnection toAsyncConnection();
/** 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