You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/01/02 19:03:33 UTC

[GitHub] [hbase] ndimiduk commented on a change in pull request #957: HBASE-23604: Clarify AsyncRegistry usage in the code.

ndimiduk commented on a change in pull request #957: HBASE-23604: Clarify AsyncRegistry usage in the code.
URL: https://github.com/apache/hbase/pull/957#discussion_r362585035
 
 

 ##########
 File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionRegistry.java
 ##########
 @@ -24,16 +24,17 @@
 import org.apache.yetus.audience.InterfaceAudience;
 
 /**
- * Implementations hold cluster information such as this cluster's id, location of hbase:meta, etc..
+ * Registry for meta information needed for connection setup to a HBase cluster. Implementations
+ * hold cluster information such as this cluster's id, location of hbase:meta, etc..
  * Internal use only.
  */
 @InterfaceAudience.Private
-interface AsyncRegistry extends Closeable {
+interface ConnectionRegistry extends Closeable {
 
 Review comment:
   Why is this still called a "registry"?
   
   A name we don't use much internally, but I think is more appropriate for this concept is a "service". What we have here follows exactly the definitions provided by the java docs on [`java.util.ServiceLoader`](https://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html),
   
   > A _service_ is a well-known set of interfaces and (usually abstract) classes. A service _provider_ is a specific implementation of a service.
   
   This implementation provides the "cluster/connection/master location service". Thus, I prefer the name "ClusterLocationService".
   
   If you don't like the name "service", we use the term "Locator" in plenty of other places in this codebase, so why not here? Implementations of this class "locate" the active master and "locate" the meta regions. The `clusterId` is the only concept that isn't "locatable", but I think that's not so bad. How about "ClusterLocator" or "ClusterConnectionLocator" ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services