RogPodge commented on a change in pull request #1399: HADOOP-16543: Cached DNS 
name resolution error
URL: https://github.com/apache/hadoop/pull/1399#discussion_r325937426
 
 

 ##########
 File path: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/RMProxy.java
 ##########
 @@ -125,16 +125,13 @@ public InetSocketAddress getRMAddress(
   private static <T> T newProxyInstance(final YarnConfiguration conf,
       final Class<T> protocol, RMProxy<T> instance, RetryPolicy retryPolicy)
           throws IOException{
+    RMFailoverProxyProvider<T> provider;
     if (HAUtil.isHAEnabled(conf) || HAUtil.isFederationEnabled(conf)) {
-      RMFailoverProxyProvider<T> provider =
-          instance.createRMFailoverProxyProvider(conf, protocol);
-      return (T) RetryProxy.create(protocol, provider, retryPolicy);
+      provider = instance.createRMFailoverProxyProvider(conf, protocol);
     } else {
-      InetSocketAddress rmAddress = instance.getRMAddress(conf, protocol);
-      LOG.info("Connecting to ResourceManager at " + rmAddress);
-      T proxy = instance.getProxy(conf, protocol, rmAddress);
-      return (T) RetryProxy.create(protocol, proxy, retryPolicy);
+      provider = instance.createNonHaRMFailoverProxyProvider(conf, protocol);
 
 Review comment:
   My previous comment was meant to refer to this piece of code sorry:
   
   "We need this change so that the AutoRefreshNoHARMFailoverProxyProvider 
works. Otherwise, it will try to get the IP address once and then fail if there 
is ever a disconnect from the RM later"

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to