Skip to main content

Shutting down your Flink job

In general, Flink Jobs can be shut down gracefully via Flink's "stop" command and ungracefully via Flink's "cancel" command.

Graceful shutdown

A graceful stop with snapshotting the current state can be done by creating the final Savepoint.

CLI
savepoint.yaml

_3
$ rok create -f savepoint.yaml
_3
_3
✔ Savepoint "my-job-final-savepoint" has been created.
_3
_3
_3
_3
_3
_3
_3
_3
_3

or


_3
$ rok create savepoint --job my-job --type Final --shutdown-method Graceful my-job-final-savepoint
_3
_3
✔ Savepoint "my-job-final-savepoint" has been created.

Hard shutdown

To cancel the underlying Flink job you need to delete the Job Resource.


_3
$ rok delete -f job.yaml
_3
_3
✔ Job "my-job" has been deleted.

or


_3
$ rok delete job my-job
_3
_3
✔ Job "my-job" has been deleted.