-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YARN-11433. Router's main() should support generic options. #6012
Conversation
@@ -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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with this but this use looks not complete.
Most other places use the getRemainingArgs().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Lines 1051 to 1058 in b6d06c8
public static void main(String[] args) throws IOException { | |
Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler()); | |
StringUtils.startupShutdownMessage(NodeManager.class, args, LOG); | |
@SuppressWarnings("resource") | |
NodeManager nodeManager = new NodeManager(); | |
Configuration conf = new YarnConfiguration(); | |
new GenericOptionsParser(conf, args); | |
nodeManager.initAndStartNodeManager(conf, false); |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@goiri Can you help review this PR again? Thank you very much! I read the code of |
...src/main/java/org/apache/hadoop/yarn/server/globalpolicygenerator/GlobalPolicyGenerator.java
Show resolved
Hide resolved
...ver/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/Router.java
Show resolved
Hide resolved
🎊 +1 overall
This message was automatically generated. |
@goiri Can you help review this PR again? Thank you very much! |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@goiri Thank you very much for your help in reviewing the code! |
Description of PR
JIRA: YARN-11433. Router's main() should support generic options.
How was this patch tested?
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?