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

Ferenc Csaky commented on FLINK-38118:
--------------------------------------

Hi! I do not think this is a bug. Even previously, this was not possible via 
{{run-application}}, this was only possible because of per-job mode existed. In 
application mode (AM), even the Job jar code runs on the JobManager, instead of 
the client, that's why it does not support attached mode, as it never did. So 
there is no such client process in AM that existed for per-job mode. IMO this 
would qualify more like a new feature instead.

But I feel like this is a bit in conflict with the design foundations of AM. 
And adding an attached mode, which would execute the job foreground would mean 
3 different things and IMO would require different considerations on 
Standalone, YARN, and K8s.

I am not necessarily against this, but I think we need to describe better what 
exactly do we wanna achieve. On K8s for example, this does seems to make sense 
to me to have at all.

> The execution.attached=true parameter does not take effect in application mode
> ------------------------------------------------------------------------------
>
>                 Key: FLINK-38118
>                 URL: https://issues.apache.org/jira/browse/FLINK-38118
>             Project: Flink
>          Issue Type: Bug
>          Components: Client / Job Submission
>    Affects Versions: 2.0.0, 1.20.2
>            Reporter: shilei-ly
>            Priority: Major
>
> In FLINK-35625, flink merged the per-job mode and application mode. 
> Currently, flink1.20 and flink2.x only support application mode, but in 
> application mode, the *execution.attached=true* and 
> *execution.shutdown-on-attached-exit=true* parameter has no effect. I think 
> application mode should support these parameters, because attach mode is very 
> useful in some scenarios, such as using attach mode in dolphinscheduler 
> scheduler to monitor flink cluster status.
> The functions of these parameters are as follows:
> 1. After submitting the task through {*}flink run -Dexecution.attached=true 
> xxx.jar{*}, the flink client process keeps running until the application 
> cluster stops.
> 2. After submitting the task through {*}flink run -Dexecution.attached=true 
> -Dexecution.shutdown-on-attached-exit=true xxx.jar{*}, the flink client can 
> control the life cycle of the application cluster. When ctrl + c stops the 
> flink client process, the application cluster should stop all jobs and stop 
> the cluster.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to