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
CheckpointIDCounterimplementation for Kubernetes. The counter will be stored in JobManager-JobID-leader ConfigMap. The key isConstants.CHECKPOINT_COUNTER_KEY, and value is counter value.
-
-
Constructor Summary
Constructors Constructor Description KubernetesCheckpointIDCounter(FlinkKubeClient kubeClient, String configMapName, String lockIdentity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longget()longgetAndIncrement()voidsetCount(long newCount)CompletableFuture<Void>shutdown(org.apache.flink.api.common.JobStatus jobStatus)voidstart()
-
-
-
Constructor Detail
-
KubernetesCheckpointIDCounter
public KubernetesCheckpointIDCounter(FlinkKubeClient kubeClient, String configMapName, @Nullable String lockIdentity)
-
-
Method Detail
-
start
public void start()
- Specified by:
startin interfaceorg.apache.flink.runtime.checkpoint.CheckpointIDCounter
-
shutdown
public CompletableFuture<Void> shutdown(org.apache.flink.api.common.JobStatus jobStatus)
- Specified by:
shutdownin interfaceorg.apache.flink.runtime.checkpoint.CheckpointIDCounter
-
getAndIncrement
public long getAndIncrement() throws Exception- Specified by:
getAndIncrementin interfaceorg.apache.flink.runtime.checkpoint.CheckpointIDCounter- Throws:
Exception
-
get
public long get()
- Specified by:
getin interfaceorg.apache.flink.runtime.checkpoint.CheckpointIDCounter
-
-