我们在K8s环境中部署了Flink作业集群(1个作业经理和1个任务经理),并将其配置为HA模式(连接到Zookeeper)。作业是有状态的,并且使用RocksDB后端启用了检查点。问题是任务管理器重新启动可以从最后一个检查点正确恢复,而作业管理器重新启动不能:
[flink-akka.actor.default-dispatcher-5]recover: 2018-11-27 11:23:26,531 INFO o.a.f.r.c.ZooKeeperCompletedCheckpointStore Recovering checkpoints from ZooKeeper.
[flink-akka.actor.default-dispatcher-5]recover: 2018-11-27 11:23:26,596 INFO o.a.f.r.c.ZooKeeperCompletedCheckpointStore Found 0 checkpoints in ZooKeeper.
[flink-akka.actor.default-dispatcher-5]recover: 2018-11-27 11:23:26,597 INFO o.a.f.r.c.ZooKeeperCompletedCheckpointStore Trying to fetch 0 checkpoints from storage.
检查点将持久保存到Google Cloud Storage和Zookeeper。
flink-conf.yaml
中的相关属性:
metrics.reporters: prom
metrics.reporter.prom.class: org.apache.flink.metrics.prometheus.PrometheusReporter
high-availability: zookeeper
high-availability.zookeeper.quorum: our-k8s-zookeeper-service:2181
high-availability.zookeeper.path.root: /flink
high-availability.cluster-id: /service_cluster
high-availability.storageDir: gs://our-flink-bucket/namespace/service/ha
high-availability.jobmanager.port: 6123
state.backend.fs.memory-threshold: 0
state.checkpoints.dir: gs://our-flink-bucket/namespace/service/checkpoints
我们在这里想念什么?