[ 
https://issues.apache.org/jira/browse/FLINK-19973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17226634#comment-17226634
 ] 

Kostas Kloudas edited comment on FLINK-19973 at 11/5/20, 10:40 AM:
-------------------------------------------------------------------

Yes, this is because if you set the {{execution.target: ...}} option in your 
config, this will lead to the {{GenericCLI}} being the active command like, and 
not the {{FlinkYarnSessionCli}}. If you want to know the details, 
[here|https://github.com/apache/flink/blob/master/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L1103]
 is where the command lines are loaded with the {{GenericCLI}} preceding  the 
{{FlinkYarnSessionCli}} and 
[here|https://github.com/apache/flink/blob/master/flink-clients/src/main/java/org/apache/flink/client/cli/GenericCLI.java#L71]
 is where the {{GenericCLI}} gets activated. Also 
[here|https://github.com/apache/flink/blob/master/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L1142]
 is the method that picks the active command line.

In essence, with the {{GenericCLI}} activated you can specify command line 
options using {{-D<option-name>=<option-value>}} where option name is the name 
of the config option as described 
[here|https://ci.apache.org/projects/flink/flink-docs-stable/ops/config.html].

So, if I am not wrong in the above, this is expected behaviour and we could 
close this issue.


was (Author: kkl0u):
Yes, this is because if you set the {{execution.target: ...}} option in your 
config, this will lead to the {{GenericCLI}} being the active command like, and 
not the {{FlinkYarnSessionCli}}. If you want to know the details, 
[here|https://github.com/apache/flink/blob/master/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L1103]
 is where the command lines are loaded with the {{GenericCLI}} preceding  the 
{{FlinkYarnSessionCli}} and 
[here|https://github.com/apache/flink/blob/master/flink-clients/src/main/java/org/apache/flink/client/cli/GenericCLI.java#L71]
 is where the {{GenericCLI}} gets activated. Also 
[here|https://github.com/apache/flink/blob/master/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L1142]
 is the method that picks the active command line.

In essence, with the {{GenericCLI}} activated you can specify command line 
options using {{-D<option-name>=<option-value>}} where option name is the name 
of the config option as described 
[here|https://ci.apache.org/projects/flink/flink-docs-stable/ops/config.html].

So, if I am not wrong in the above, this is expected behaviour.

> 【Flink-Deployment】YARN CLI Parameter doesn't work when set `execution.target: 
> yarn-per-job` config
> --------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-19973
>                 URL: https://issues.apache.org/jira/browse/FLINK-19973
>             Project: Flink
>          Issue Type: Bug
>          Components: Command Line Client, Deployment / YARN
>    Affects Versions: 1.12.0
>            Reporter: zhisheng
>            Priority: Major
>         Attachments: image-2020-11-04-20-58-49-738.png, 
> image-2020-11-04-21-00-06-180.png
>
>
> when i use flink-sql-client to deploy job to yarn(per job mod), I set 
> `execution.target: yarn-per-job` in flink-conf.yaml, job will deploy to yarn.
>  
> when I deploy jar job to yarn, The command is `./bin/flink run -m 
> yarn-cluster -ynm flink-1.12-test  -ytm 3g -yjm 3g 
> examples/streaming/StateMachineExample.jar`, it will deploy ok, but the 
> `-ynm`、`-ytm 3g` and `-yjm 3g` doesn't work. 
>  
> !image-2020-11-04-20-58-49-738.png|width=912,height=235!
>  
>  
> when i remove the config `execution.target: yarn-per-job`, it work well.
>  
> !image-2020-11-04-21-00-06-180.png|width=1047,height=150!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to