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.-
Field Summary
Fields inherited from interface org.apache.flink.runtime.checkpoint.CheckpointIDCounter
INITIAL_CHECKPOINT_ID -
Constructor Summary
ConstructorsConstructorDescriptionKubernetesCheckpointIDCounter(FlinkKubeClient kubeClient, String configMapName, String lockIdentity) -
Method Summary
-
Constructor Details
-
KubernetesCheckpointIDCounter
public KubernetesCheckpointIDCounter(FlinkKubeClient kubeClient, String configMapName, @Nullable String lockIdentity)
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceorg.apache.flink.runtime.checkpoint.CheckpointIDCounter
-
shutdown
- Specified by:
shutdownin interfaceorg.apache.flink.runtime.checkpoint.CheckpointIDCounter
-
getAndIncrement
- Specified by:
getAndIncrementin interfaceorg.apache.flink.runtime.checkpoint.CheckpointIDCounter- Throws:
Exception
-
get
public long get()- Specified by:
getin interfaceorg.apache.flink.runtime.checkpoint.CheckpointIDCounter
-
setCount
- Specified by:
setCountin interfaceorg.apache.flink.runtime.checkpoint.CheckpointIDCounter- Throws:
Exception
-