asfgit closed pull request #6491: [FLINK-10057] Update FlinkYarnSessionCli.java
URL: https://github.com/apache/flink/pull/6491
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java
b/flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java
index c0180a83be1..31cdbad922c 100644
---
a/flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java
+++
b/flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java
@@ -530,12 +530,14 @@ protected Configuration
applyCommandLineOptionsToConfiguration(CommandLine comma
private boolean isYarnPropertiesFileMode(CommandLine commandLine) {
boolean canApplyYarnProperties =
!commandLine.hasOption(addressOption.getOpt());
- for (Option option : commandLine.getOptions()) {
- if (allOptions.hasOption(option.getOpt())) {
- if (!isDetachedOption(option)) {
- // don't resume from properties file if
yarn options have been specified
- canApplyYarnProperties = false;
- break;
+ if (canApplyYarnProperties) {
+ for (Option option : commandLine.getOptions()) {
+ if (allOptions.hasOption(option.getOpt())) {
+ if (!isDetachedOption(option)) {
+ // don't resume from properties
file if yarn options have been specified
+ canApplyYarnProperties = false;
+ break;
+ }
}
}
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services