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

Kostas Kloudas edited comment on FLINK-19909 at 11/1/20, 12:58 PM:
-------------------------------------------------------------------

[~fly_in_gis] We want different behaviour when we cancel a job (delete HA data) 
and when a job fails (restart). So even if we throw 
{{ApplicationFailureException}} in the {{runApplicationEntryPoint}}, in the 
case of cancellation it has to contain the {{Status}} of the job as 
{{Cancelled}} when the job gets cancelled. 

In your case, you see a {{JobCancellationException}} being thrown in the 
{{runApplicationEntryPoint()}} ?


was (Author: kkl0u):
[~fly_in_gis] We want different behaviour when we cancel a job (delete HA data) 
and when a job fails (restart). So even if we throw 
{{ApplicationFailureException}} in the {{runApplicationEntryPoint}}, in the 
case of cancellation it has to contain the `Status` of the job as `Cancelled` 
when the job gets cancelled. 

In your case, you see a`JobCancellationException` being thrown in the 
`runApplicationEntryPoint()` ?

> Flink application in attach mode could not terminate when the only job is 
> canceled
> ----------------------------------------------------------------------------------
>
>                 Key: FLINK-19909
>                 URL: https://issues.apache.org/jira/browse/FLINK-19909
>             Project: Flink
>          Issue Type: Bug
>          Components: Deployment / Kubernetes, Deployment / YARN, Runtime / 
> Coordination
>    Affects Versions: 1.12.0
>            Reporter: Yang Wang
>            Priority: Critical
>             Fix For: 1.12.0
>
>
> Currently, the Yarn and Kubernetes application in attach mode could not 
> terminate the Flink cluster after the only job is canceled. Because we are 
> throwing {{ApplicationExecutionException}} in 
> {{ApplicationDispatcherBootstrap#runApplicationEntryPoint}}. However, we are 
> only checking {{ApplicationFailureException}} in 
> {{runApplicationAndShutdownClusterAsync}}. Then we will go to fatal error 
> handler which make the jobmanager directly exits. And it has no chance to 
> deregister itself to the cluster manager(Yarn/Kubernetes). That means the 
> jobmanager will be relaunched by cluster manager again and again until it 
> exhausts the retry attempts.
>  
> cc [~kkl0u], I am not sure is this an expected change? I think it could work 
> in 1.11.



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

Reply via email to