This is an automated email from the ASF dual-hosted git repository.
gary pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new cb14194 [FLINK-10057] Update FlinkYarnSessionCli.java
cb14194 is described below
commit cb141940821bcf62f4102dfd5c76aff99d0c15d1
Author: lzqdename <[email protected]>
AuthorDate: Sat Aug 4 22:39:14 2018 +0800
[FLINK-10057] Update FlinkYarnSessionCli.java
optimalize
org.apache.flink.yarn.cli.FlinkYarnSessionCli.isYarnPropertiesFileMode
This closes #6491.
---
.../org/apache/flink/yarn/cli/FlinkYarnSessionCli.java | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
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 7ba2150..e5311cd 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
@@ -527,12 +527,14 @@ public class FlinkYarnSessionCli extends
AbstractCustomCommandLine<ApplicationId
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;
+ }
}
}
}