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.
Connect to your host where you run your Flink jobs using
ssh root@[***FLINK HOSTNAME***] Password:[***PASSWORD***]
Determine the related Flink job IDs.
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
The command returns an HDFS path, which is the automatically created savepoint that stores the application state.
flink stop [***FLINK JOB ID***]
- Stop your Flink jobs with a savepoint with providing the savepoint path
Use this method if you want to specify the savepoint path.
flink stop --savepointPath hdfs:///tmp/savepoints [***FLINK JOB ID***]
- Cancel your applications without creating a
Use this method if you do not need to restore the application state after the upgrade.
flink cancel [***FLINK JOB ID***]
- Stop your applications with a savepoint to store the application state.
- Take note of the savepoint path in the output of the command as you must provide the path when resuming Flink stateful applications.