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-12152] Make the vcore that Application Master used configurable for Flink on YARN #8438
Conversation
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community 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:
|
@tillrohrmann The short config option name may need to be discussed. Currently, I used |
@tillrohrmann Do you have any suggestions about the abbreviations of the parameters? |
What about only exposing this feature via the |
Actually, IMO, we should not expose this config option via the |
We already expose some deployment specific configuration options via the |
@tillrohrmann It seems you are right, we did not use this mode so I have not paid attention. Sorry. |
@tillrohrmann What about the new changes? |
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 for opening this PR @yanghua. The changes look good. I had one suggestion concerning the test of the configured value. Moreover, I think we don't need the test if we say that we don't check for the lower bound of vcores.
@@ -229,6 +229,13 @@ private void isReadyForDeployment(ClusterSpecification clusterSpecification) thr | |||
throw new YarnDeploymentException("Flink configuration object has not been set"); | |||
} | |||
|
|||
int configuredAmVcores = flinkConfiguration.getInteger(YarnConfigOptions.APP_MASTER_VCORES); | |||
if (configuredAmVcores < YarnConfigOptions.APP_MASTER_VCORES.defaultValue()) { |
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 we should compare configuredAmVcores
against numYarnMaxVcores
which we calculate a bit further down. I think we don't have to check that we request fewer cores than 1
because it won't take any effect.
public static final ConfigOption<Integer> APP_MASTER_VCORES = | ||
key("yarn.appmaster.vcores") | ||
.defaultValue(1) | ||
.withDescription("The number of virtual cores (vcores) used by YARN application master."); |
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 guess we need to regenerate the configuration documentation because we added a new config option: mvn package -Dgenerate-config-docs -pl flink-docs
.
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 have tried, but it does not take effect. In addition, it seems all the generated HTML documentation are not tracked by git.
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.
You first need to install flink-yarn
. I'll do it while merging.
} finally { | ||
clusterDescriptor.close(); | ||
} | ||
} |
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 we don't need this test here.
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 for the PR @yanghua. LGTM. While merging I'll regenerate the docs.
…e for Flink on YARN This closes apache#8438.
…e for Flink on YARN This closes apache#8438.
…e for Flink on YARN This closes apache#8438.
What is the purpose of the change
This pull request makes the vcore that Application Master used configurable for Flink on YARN
Brief change log
vc
for Flink on YARNVerifying this change
This change is already covered by existing tests, such as testCommandLineClusterSpecification.
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (yes / no)Documentation