simbadzina commented on code in PR #6510:
URL: https://github.com/apache/hadoop/pull/6510#discussion_r1475695932


##########
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/RouterObserverReadProxyProvider.java:
##########
@@ -84,7 +84,8 @@ public class RouterObserverReadProxyProvider<T> extends 
AbstractNNFailoverProxyP
 
   public RouterObserverReadProxyProvider(Configuration conf, URI uri, Class<T> 
xface,
       HAProxyFactory<T> factory) {
-    this(conf, uri, xface, factory, new IPFailoverProxyProvider<>(conf, uri, 
xface, factory));
+    this(conf, uri, xface, factory,
+        new ConfiguredFailoverProxyProvider<>(conf, uri, xface, factory));

Review Comment:
   For a different internal proxyprovider we have code like below.
   ```
   this(conf, uri, xface, proxyFactory, getFailoverProxyProvider(conf, uri, 
xface, proxyFactory));
   ```
   and
   ```
     @VisibleForTesting
     protected static <T> AbstractNNFailoverProxyProvider<T> 
getFailoverProxyProvider(
         Configuration conf, URI uri, Class<T> xface, HAProxyFactory<T> 
proxyFactory) {
       String configKey = FAILOVER_PROXY_PROVIDER + "." + uri.getHost();
       Class<AbstractNNFailoverProxyProvider<T>> fppClass =
           (Class<AbstractNNFailoverProxyProvider<T>>) conf.getClass(configKey,
               (Class<? extends AbstractNNFailoverProxyProvider>) 
DEFAULT_FAILOVER_PROXY_PROVIDER,
               AbstractNNFailoverProxyProvider.class);
   
       try {
         Constructor<AbstractNNFailoverProxyProvider<T>> ctor = 
fppClass.getConstructor(
             Configuration.class, URI.class, Class.class, HAProxyFactory.class);
         return ctor.newInstance(conf, uri, xface, proxyFactory);
       } catch (Exception e) {
         LOG.error("Failed to create failover proxy provider", e);
         throw new IllegalArgumentException(e);
       }
     }
     ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to