Reputation: 4231
I have the following code :
val stateUri = "file:///tmp/"
new RocksDBStateBackend(stateUri, true)
Upvotes: 2
Views: 1993
Reputation: 13346
bin/flink savepoint <JOB_ID> <TARGET_DIRECTORY>
. Alternatively, you can also cancel the job with a savepoint which creates a savepoint and stops the job bin/flink cancel --withSavepoint <TARGET_DIRECTORY> <JOB_ID>
. Both CLI calls will return a path to the created savepoint which should be stored under your TARGET_DIRECTORY
. In order to resume from this savepoint, you should enter this path into the Savepoint Path field in the UI or submit a job via bin/flink run --fromSavepoint <SAVEPOINT_PATH> <JAR>
.stateUri
is only the base path for the state backend where it stores the checkpoint. The state backend will create a sub directory with the id of the job under which it will store the checkpoints. Thus the path of a checkpoint usually looks like stateUri/JOB_ID/chk-1
where JOB_ID
is a UUID (e.g. 0ba86fd9d1b29d90796e4a7d27f9b2f9
) for the first checkpoint.bin/flink run --fromSavepoint <SAVEPOINT_PATH> --parallelism 10 <JAR>
).stateUri
which are the different job ids. Checkpoints will be stored in each sub directory for each of the jobs separately.Upvotes: 4