All Products
Search
Document Center

Realtime Compute for Apache Flink:Cancel a job

Last Updated:Mar 09, 2026

Cancel a running job to apply configuration changes or recover from a failure. After you modify SQL code, add or remove parameters in the WITH clause, or change the job version, you must publish the job, cancel it, and restart it for the changes to take effect. If a job fails and cannot recover by reusing state data, cancel and restart it.

Prerequisites

  • The job is running.

  • If you want to allow other Alibaba Cloud accounts or RAM users to use your resources in fully managed Flink, you must grant them the required permissions, such as the permissions to cancel a job. For more information, see Grant permissions to an account.

Checkpoint retention

The system retains only the latest checkpoint while a job is running. When you cancel a job, the system does not automatically delete the checkpoint.

Procedure

  1. Go to the Deployments page.

    1. Log on to the Realtime Compute for Apache Flink console.

    2. Find the workspace that you want to manage and click Console in the Actions column.

  2. In the left-side navigation pane, click O&M > Deployments. On the Deployments page, find the desired job deployment and click Cancel in the Actions column. image.png

  3. (Optional) In the dialog box, click More Strategies to expand the following options:

    Option

    Description

    When to use

    Stop With Savepoint

    Creates a savepoint before cancellation. If not selected, the job enters the cancel process without creating a savepoint.

    Select this option to preserve state for a later restart, such as after code or parameter changes.

    Stop With Drain

    Permanently terminates the job. For more information, see Drain.

    Select this option only to permanently shut down a job with no plan to restart.

    Important

    Do not select Stop With Drain if you plan to restart the job later. Selecting this option may cause errors when the job is resumed.

  4. Click OK.

Next steps

After cancellation, restart the job to apply your changes.