I'm using flink 1.11 with RocksDBStateBackend, the code looks like this:
RocksDBStateBackend stateBackend = new RocksDBStateBackend("hdfs:///flink-checkpoints", true);
stateBackend.setDbStoragePath(config.getString("/tmp/rocksdb/"));
env.setStateBackend(stateBackend);
My questions are:
- My understanding is that when
DbStoragePath
is set, Flink will put all checkpoints and state in a local disk (in my case/tmp/rocksdb
) before storing into hadoophdfs:///flink-checkpoints
. Is that right? And if it's right, should I always setDbStoragePath
for better performance? - Because Flink doesn't delete old checkpoints, I have a job periodically clean up old checkpoints. But I'm not sure is it safe to do that if I set incremental checkpoints?