Class KubernetesCheckpointIDCounter

java.lang.Object
org.apache.flink.kubernetes.highavailability.KubernetesCheckpointIDCounter
All Implemented Interfaces:
org.apache.flink.runtime.checkpoint.CheckpointIDCounter

public class KubernetesCheckpointIDCounter extends Object implements org.apache.flink.runtime.checkpoint.CheckpointIDCounter
CheckpointIDCounter implementation for Kubernetes. The counter will be stored in JobManager-JobID-leader ConfigMap. The key is Constants.CHECKPOINT_COUNTER_KEY, and value is counter value.
  • Constructor Details

    • KubernetesCheckpointIDCounter

      public KubernetesCheckpointIDCounter(FlinkKubeClient kubeClient, String configMapName, @Nullable String lockIdentity)
  • Method Details

    • start

      public void start()
      Specified by:
      start in interface org.apache.flink.runtime.checkpoint.CheckpointIDCounter
    • shutdown

      public CompletableFuture<Void> shutdown(org.apache.flink.api.common.JobStatus jobStatus)
      Specified by:
      shutdown in interface org.apache.flink.runtime.checkpoint.CheckpointIDCounter
    • getAndIncrement

      public long getAndIncrement() throws Exception
      Specified by:
      getAndIncrement in interface org.apache.flink.runtime.checkpoint.CheckpointIDCounter
      Throws:
      Exception
    • get

      public long get()
      Specified by:
      get in interface org.apache.flink.runtime.checkpoint.CheckpointIDCounter
    • setCount

      public void setCount(long newCount) throws Exception
      Specified by:
      setCount in interface org.apache.flink.runtime.checkpoint.CheckpointIDCounter
      Throws:
      Exception