Search code examples
apache-flinkrocksdb

How to delete the rocksdb(flink state) file before flink jobmanager is deleted?


I want to remove all the rocksdb files before/after flink job cluster has been removed. We deployed the flink jobs on K8s. we store state on rocksdb for each job cluster. and the rocksdb which store the state will not be deleted when the job cluster is stopped. Any idea on it?


Solution

  • There's no requirement for durable storage for RocksDB. You could simply use ephemeral local storage, rather than a PVC. Flink relies on the checkpoints for recovery, and doesn't need the local RocksDB instance to survive.

    On other hand, if you want to use local recovery, then you'll need to use persistent local storage.