-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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-11084. Introduce new config to specify AM default node-label whe… #4060
Conversation
More tests will be attached later. |
💔 -1 overall
This message was automatically generated. |
If u have time, could you help review it? @szilard-nemeth @9uapaw @virajjasani @jojochuang |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
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 for your contribution @zuston. I think this could be a useful addition, however, YARN properties tend to work a bit different than what you propose here. Since the AM default-node-label-expression is more specific, than the general purpose default-node-label-expression, in my opinion when you set am.default-node-label-expression the following should happen:
- overwrite general purpose default-node-label-expression for the AM container
- if am.default-node-label-expression is not set, then fallback to the general purpose default-node-label-expression
In contrast to how it works in the proposal: - set AM default-node-label-expression only when default-node-label-expression is not set
I think it could be misleading and would make it impossible to define different node label expression for AM and other containers.
@@ -640,6 +643,12 @@ private RMAppImpl createAndPopulateNewRMApp( | |||
SchedulerUtils.normalizeAndValidateRequest(amReq, maxAllocation, | |||
queue, isRecovery, rmContext, null, nodeLabelsEnabled); | |||
|
|||
String amNodeLabel = amReq.getNodeLabelExpression(); | |||
if (org.apache.commons.lang3.StringUtils.isEmpty(amNodeLabel) |
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.
Please use a simpler package identifier ie. Stringutils.isEmpty, or import isEmpty directly.
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.
Got it. Thanks
Thanks for your quick review @9uapaw Agree with your comment. So let's do a priority order user-defined AM node label > AM default-node-label-expression > default general node-label Right? |
Updated. Please check it @9uapaw Thanks. |
🎊 +1 overall
This message was automatically generated. |
Gentle ping @9uapaw @szilard-nemeth . Thanks ~ |
When AM of app is not specified any node-labels and this configuration will | ||
attach the default node-label to AM, which the default of config is disabled. |
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 think it is superfluous to specify an empty value as a yarn-default. It is by default null, if you do not set a default value for it.
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.
Do u mean that it should not be specified in yarn-default.xml?
But if not, where should be attached detailed config description?
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.
Sorry I know how to do. Just need to remove the value.
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.
Yes, I did mean that. You can set a detailed description in the markdown files, in this case: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/NodeLabel.md
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.
Got it. I will set the detailed description in the nodelabel.md
Also, could you address the checkstyle issues as well please? |
Updated. Could u help review again? @9uapaw |
yarn.resourcemanager.node-labels.am.default-node-label-expression | Besides when ApplicationMaster of application is not specified any node-labels, then the configuration will attach the default node-label to AM. The default of this config is disabled. | ||
|
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.
Could you rephrase it to:
"Overwrites default-node-label-expression only for the ApplicationMaster container. It is disabled by default."
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.
Thanks @zuston I had only one comment, the change LGTM. I will commit it after the jenkins run.
💔 -1 overall
This message was automatically generated. |
All Done @9uapaw |
🎊 +1 overall
This message was automatically generated. |
Thanks for the patch @zuston. I have removed the yarn-default change from the commit because it was unnecessary. |
Thanks for your patience and review @9uapaw |
…n not specified
Description of PR
What
When submitting application to Yarn and user don't specify any node-label on AM request and ApplicationSubmissionContext, we hope that Yarn could provide the default AM node-label.
Why
Yarn cluster in our internal company exists on-premise NodeManagers and elastic NodeManagers (which is built on K8s). To prevent application instability due to elastic NM decommission, we hope that the AM of job can be allocated to on-premise NMs.
How was this patch tested?
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?