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
[FLINK-15437][yarn] Apply dynamic properties early on client side. #10728
Conversation
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 322a659 (Tue Dec 31 05:18:13 UTC 2019) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
322a659
to
4bae531
Compare
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.
@xintongsong Thanks for your contribution. I think this PR is a good fix. We apply the dynamic properties earlier in the client and then ship the updated flink config to jobmanager. So we will not need to apply the dynamic properties again in the jobmanager. And i do not find out some negative effects.
For the magic yarn properties file, we keep the same behavior now and try to remove it in the next major release.
@@ -1045,10 +1031,6 @@ private ApplicationReport startAppMaster( | |||
appMasterEnv.put(YarnConfigKeys.ENV_KRB5_PATH, remoteKrb5Path.toString()); | |||
} | |||
|
|||
if (dynamicPropertiesEncoded != null) { |
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.
Since we have apply all the dynamic properties to the client uploaded flink configuration, so we will not need to set the ENV_DYNAMIC_PROPERTIES
and parse it in the jobmanager. So YarnConfigKeys.ENV_DYNAMIC_PROPERTIES
could be removed and all the usage on the jobmanager side should also be removed.
@@ -369,6 +372,14 @@ public Configuration applyCommandLineOptionsToConfiguration(CommandLine commandL | |||
effectiveConfiguration.setInteger(TaskManagerOptions.NUM_TASK_SLOTS, Integer.parseInt(commandLine.getOptionValue(slots.getOpt()))); | |||
} | |||
|
|||
dynamicPropertiesEncoded = encodeDynamicProperties(commandLine); | |||
if (dynamicPropertiesEncoded != null && !dynamicPropertiesEncoded.isEmpty()) { |
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 the null check is unnecessary since the encodeDynamicProperties
will always return a NonNull
value.
…ointUtils#installSecurityContext.
…loadConfiguration.
4bae531
to
4cd98f1
Compare
@wangyang0918 Thanks for the review, comments addressed. |
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.
@xintongsong Thanks for addressing my comment. LGTM now.
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.
LGTM. Merging...
Thanks for the review, @tisonkun. |
What is the purpose of the change
This PR applies dynamic properties early on client side, to make sure the client uses the correct configurations set via dynamic properties.
Brief change log
YarnClusterDescriptor
.Verifying this change
FlinkYarnSessionCliTest#testDynamicProperties
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (no)Documentation