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. Find the YARN application IDs.
    yarn application -list -appTypes "Apache Flink"
  2. Determine the related Flink job IDs.
    flink list -yid <YARN application ID>
  3. Stop your Flink applications.
    You have two choices:
    • Stop your applications with a savepoint to store the application state.
      flink stop -yid <YARN application ID> <Flink job ID>

      The command returns an HDFS path, which is the automatically created savepoint that stores the application state.

    • Cancel your applications without creating a savepoint.
      flink cancel -yid <YARN application ID> <Flink job ID>

      Use this method if you do not need to restore the application state after the upgrade.