Stopping Flink applications

You must stop your Flink applications before updating the artifacts. You can use the stop command to create a savepoint of your application. You can also use the cancel command to stop your Flink application without creating a savepoint.

You can use savepoints to resume the application state after the upgrade.

  1. Connect to your host where you run your Flink jobs using ssh.
    ssh root@[***FLINK HOSTNAME***]
    Password:[***PASSWORD***]
  2. Determine the related Flink job IDs.
    flink list
  3. Stop your Flink applications.
    You can choose from the following options based on the application state and savepoint path:
    • Stop your applications with a savepoint to store the application state.
      flink stop [***FLINK JOB ID***]
      The command returns an HDFS path, which is the automatically created savepoint that stores the application state.
    • Stop your Flink jobs with a savepoint with providing the savepoint path for HDFS.
      flink stop --savepointPath hdfs:///tmp/savepoints [***FLINK JOB ID***]
      Use this method if you want to specify the savepoint path.
    • Cancel your applications without creating a savepoint.
      flink cancel [***FLINK JOB ID***]
      Use this method if you do not need to restore the application state after the upgrade.
  4. Take note of the savepoint path in the output of the command as you must provide the path when resuming Flink stateful applications.