You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "slfan1989 (via GitHub)" <gi...@apache.org> on 2023/06/08 05:51:49 UTC

[GitHub] [hadoop] slfan1989 commented on a diff in pull request #5722: YARN-11504. [Federation] YARN Federation Supports Non-HA mode.

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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org