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/08/31 23:33:02 UTC

[GitHub] [hadoop] slfan1989 commented on a diff in pull request #6012: YARN-11433. Router's main() should support generic options.

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


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-globalpolicygenerator/src/main/java/org/apache/hadoop/yarn/server/globalpolicygenerator/GlobalPolicyGenerator.java:
##########
@@ -290,7 +291,9 @@ private String getHostName(Configuration config)
 
   public static void main(String[] argv) {
     try {
-      startGPG(argv, new YarnConfiguration());
+      YarnConfiguration conf = new YarnConfiguration();
+      new GenericOptionsParser(conf, argv);

Review Comment:
   Thank you very much for helping review the code! When I first saw `YARN-11433`, my thoughts were aligned with yours, and I also had concerns about whether such an implementation was necessary.
   
   I noticed `YARN-3255, where RM, NM, JobHistoryServer, and WebAppProxyServer's main() should support generic options.`  Other components in YARN, such as `RM`, `NM`, and `JobHistoryServer`, have implemented similar logic. I believe `Router` and `GPG` should be able to implement this logic as well.



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