In the console of fully managed Flink, you can suspend or cancel a job that is in the RUNNING state. This topic describes how to suspend and cancel a job.

Background information

The feature descriptions, use scenarios, and job restart policies in the suspend and cancel operations are different. You can perform the suspend or cancel operation based on your business requirements. The following table describes the differences between the two operations.
Operation Description Scenario Job restart policy
Suspend If you suspend a job, you can choose whether to create a savepoint before the job is suspended based on your business requirements. After you modify the SQL logic or resource configurations for a job, you must suspend and then restart the job to make the modifications take effect. If a job is suspended and then restarted, the job resumes from the most recent savepoint or checkpoint. For more information, see Start a job.
Cancel If you cancel a job, you can choose whether to create a savepoint before the job is canceled. By default, the system creates a savepoint for a job before the job is canceled. The process varies based on whether you select Create a Savepoint before cancelling:
  • If you select Create a Savepoint before cancelling, the system creates a savepoint for the job and then the job enters the cancel process. After the job is canceled, the system deletes the checkpoint information about the job.
  • If you do not select Create a Savepoint before cancelling, the job enters the cancel process. After the job is canceled, the system deletes the checkpoint information about the job.
If you change the version of a job, add or delete parameters to or from the WITH clause, or add parameters for a job, the changes take effect after you cancel the job and then restart it. If the state data cannot be reused, you must cancel and then restart the job. If you restart a job that is canceled, you can select Start without state for Start Method and specify Start Time for Reading Data. You can also resume a job from the savepoint that you select. For more information, see Start a job.
Note If the state of the savepoint that is used to resume the job is not supported because you modify the job configurations, such as the SQL logic, the job can only start without the state.

Suspend a job

  1. Log on to the Realtime Compute for Apache Flink console.
  2. On the Fully Managed Flink tab, find the workspace that you want to manage and click Console in the Actions column.
  3. In the left-side navigation pane, click Deployments.
  4. On the Deployments page, find the job that you want to suspend and click Suspend in the Actions column.
  5. In the dialog box that appears, click OK.
    Confirm Suspend
    Note Before you click OK, you can select Create a Savepoint before suspending.

Cancel a job

  1. Log on to the Realtime Compute for Apache Flink console.
  2. On the Fully Managed Flink tab, find the workspace that you want to manage and click Console in the Actions column.
  3. In the left-side navigation pane, click Deployments.
  4. On the Deployments page, find the job that you want to cancel and click Cancel in the Actions column.
  5. In the dialog box that appears, click OK.
    Confirm Cancel
    Note When you cancel a job, Create a Savepoint before cancelling is automatically selected. If you do not want fully managed Flink to create a savepoint, you can clear Create a Savepoint before cancelling and click OK.