Apache9 commented on code in PR #5770:
URL: https://github.com/apache/hbase/pull/5770#discussion_r1543157348


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionRegistryFactory.java:
##########
@@ -17,27 +17,75 @@
  */
 package org.apache.hadoop.hbase.client;
 
-import static 
org.apache.hadoop.hbase.HConstants.CLIENT_CONNECTION_REGISTRY_IMPL_CONF_KEY;
-
+import java.io.IOException;
+import java.net.URI;
+import java.util.ServiceLoader;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.security.User;
 import org.apache.hadoop.hbase.util.ReflectionUtils;
 import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap;
 
 /**
- * Factory class to get the instance of configured connection registry.
+ * The entry point for creating a {@link ConnectionRegistry}.
  */
 @InterfaceAudience.Private
 final class ConnectionRegistryFactory {
 
+  private static final Logger LOG = 
LoggerFactory.getLogger(ConnectionRegistryFactory.class);
+
+  private static final ImmutableMap<String, ConnectionRegistryCreator> 
CREATORS;
+  static {
+    ImmutableMap.Builder<String, ConnectionRegistryCreator> builder = 
ImmutableMap.builder();
+    for (ConnectionRegistryCreator factory : 
ServiceLoader.load(ConnectionRegistryCreator.class)) {

Review Comment:
   We also load SaslClientAuthenticationProvider with ServiceLoader.
   
   I think later we could change this to IA.LimitedPrivate(xxx)



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to