I am using Flink with Stateful functions. I'm tryi...
# troubleshooting
n
I am using Flink with Stateful functions. I'm trying to understand how our jobs would resume if the Flink and Statefun containers went down within my K8s cluster. I'm setting checkpoints and savepoints using the following config:
Copy code
state.checkpoints.dir: file:///flink-data/checkpoints
execution.checkpointing.interval: 10000 #in milliseconds - must be greater than 10 - this is for internal failure recovery
state.checkpoints.num-retained: 3
state.backend.local-recovery: true
# <https://kubernetes.io/docs/concepts/workloads/controllers/job/>
state.savepoints.dir: file:///flink-data/savepoints
I can see checkpoints being saved but I can't work out how savepoints are saved to my persistent K8s volume, is this something I need to do manually?
k
Hi, First of all did you create a PVC and PV for your flink-data? Secondly are you running in native or standalone mode? I would start reading this page: https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-release-1.3/docs/custom-resource/job-management/ It contains a lot of information on how to manage your states
If I were you I would rely on 'last-state' with k8s HA enabled and only use savepoints in case of disaster recovery, with last state there is little to no effort for job upgrades and so on I hope it helps