slfan1989 commented on code in PR #5722:
URL: https://github.com/apache/hadoop/pull/5722#discussion_r1222483790


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/RMProxy.java:
##########
@@ -116,6 +116,28 @@ protected static <T> T createRMProxy(final Configuration 
configuration,
     return newProxyInstance(conf, protocol, instance, retryPolicy);
   }
 
+  /**
+   * Currently, used by NodeManagers only.
+   *
+   * @param configuration configuration.
+   * @param protocol protocol.
+   * @param instance RMProxy instance.
+   * @return RMProxy.
+   * @param <T> Generic T.
+   * @throws IOException io error occur.
+   */
+  protected static <T> T createRMProxyFederation(final Configuration 
configuration,
+      final Class<T> protocol, RMProxy<T> instance) throws IOException {
+    YarnConfiguration yarnConf =
+        (configuration instanceof YarnConfiguration) ? (YarnConfiguration) 
configuration :
+        new YarnConfiguration(configuration);
+    if(isFederationNonHAEnabled(yarnConf)){

Review Comment:
   Thank you very much for your help to review the code! I will modify the code.



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