[
https://issues.apache.org/jira/browse/FLINK-10743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16672915#comment-16672915
]
ASF GitHub Bot commented on FLINK-10743:
----------------------------------------
uce opened a new pull request #7004: [FLINK-10743] [runtime] Use 0
processExitCode for ApplicationStatus.CANCELED
URL: https://github.com/apache/flink/pull/7004
## What is the purpose of the change
This pull request changes the process exit code of
`ApplicationStatus.CANCELED` to `0`. This handles cancellation as successful
termination since it is triggered by a user.
We map the Flink internal `JobStatus` to `ApplicationStatus` and use the
attached exit code to terminate the entry point.
## Brief change log
- Change `processExitCode` to `0` of `ApplicationStatus.CANCELED`
- Add test for successful vs. non-successful ApplicationStatus exit codes
## Verifying this change
- You can verify this change by running the `StandaloneJobClusterEntryPoint`
in Kubernetes as documented in
[flink-container](https://github.com/apache/flink/tree/master/flink-container/kubernetes).
Before this change, cancellation leads to immediate restart of the job. With
this fix, the job terminates properly.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: Potentially **yes**. Other cluster frameworks might still
expect the non-zero exit code. The tests don't cover this. Therefore, I'm
assuming that it does not effect them.
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Yarn/Mesos, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
----------------------------------------------------------------
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]
> Use 0 processExitCode for ApplicationStatus.CANCELED
> ----------------------------------------------------
>
> Key: FLINK-10743
> URL: https://issues.apache.org/jira/browse/FLINK-10743
> Project: Flink
> Issue Type: Bug
> Components: Cluster Management, Kubernetes, Mesos, YARN
> Affects Versions: 1.6.3, 1.7.0
> Reporter: Ufuk Celebi
> Assignee: Ufuk Celebi
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.7.0
>
>
> {{org.apache.flink.runtime.clusterframework.ApplicationStatus}} is used to
> map {{org.apache.flink.runtime.jobgraph.JobStatus}} to a process exit code.
> We currently map {{ApplicationStatus.CANCELED}} to a non-zero exit code
> ({{1444}}). Since cancellation is a user-triggered operation I would consider
> this to be a successful exit and map it to exit code {{0}}.
> Our current behavior results in applications running via the
> {{StandaloneJobClusterEntryPoint}} and Kubernetes pods as documented in
> [flink-container|https://github.com/apache/flink/tree/master/flink-container/kubernetes]
> to be immediately restarted when cancelled. This only leaves the option of
> killing the respective job cluster master container.
> The {{ApplicationStatus}} is also used in the YARN and Mesos clients, but I'm
> not familiar with that part of the code base and can't asses how changing the
> exit code would affect these clients. A quick usage scan for
> {{ApplicationStatus.CANCELED}} did not surface any problematic usages though.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)