I have a Flink job with the properties ```jobmanag...
# troubleshooting
r
I have a Flink job with the properties
Copy code
jobmanager.rpc.address: opensearch-storage-jobmanager
scheduler-mode: reactive
rest.flamegraph.enabled: true
state.backend: hashmap
state.checkpoints.dir: file:///checkpoints/storage
state.savepoints.dir: file:///checkpoints/storage
execution.checkpointing.interval: 20 seconds
execution.checkpointing.min-pause: 10 seconds
metrics.reporters: prom
metrics.reporter.prom.factory.class: org.apache.flink.metrics.prometheus.PrometheusReporterFactory
The job is set up to always have a state of ~40mb. When I go into the container, I can see the state in the checkpoint directory like the first picture When I switch to using RocksDB so I have the properties
Copy code
jobmanager.rpc.address: opensearch-storage-jobmanager
scheduler-mode: reactive
rest.flamegraph.enabled: true
state.backend: rocksdb
state.checkpoints.dir: file:///checkpoints/storage
state.savepoints.dir: file:///checkpoints/storage
execution.checkpointing.interval: 20 seconds
execution.checkpointing.min-pause: 10 seconds
metrics.reporters: prom
metrics.reporter.prom.factory.class: org.apache.flink.metrics.prometheus.PrometheusReporterFactory
and I go to the container, I do not see any state in the checkpoints directory like in the second picture. Where is the state checkpointed? In the taskmanager, there is an instance of RocksDB running and I see an sst file like in the third picture. It is very much possible that the state is compressed since the size is artificially created through a string in the input model that is just a bunch of A's and when I set
execution.checkpointing.snapshot-compression: true
, the checkpointed state is 1.9mb. Same problem both locally through Docker and on a cluster. When using RocksDB, the _metadata file references some other files that look like they should be located right next to the _metadata file, e.g.
file:/checkpoints/storage/097a4936415bfed82c63da0f400f51a2/chk-31/c5cadff9-8306-42bd-805c-9f7ccc066a95
,
file:/checkpoints/storage/097a4936415bfed82c63da0f400f51a2/chk-31/3c572647-6dae-4fd5-9716-25b46ced0dd4e
,
file:/checkpoints/storage/097a4936415bfed82c63da0f400f51a2/chk-31/61c2864b-0d5a-400a-9c38-09e8e17ccd2a
, but none of these files exist First two pictures are from the jobmanager, last picture is from the taskmanager
It seems you can update state by reference when using hashmap state backend, but when using rocksdb you have to call update on the state before it is serialised, i.e.
state.value().add(newObject)
works with hashmap but not with rocksdb. Makes sense, but not super transparent and i cant find any documentation mentioning it anywhere