Class KubernetesCheckpointRecoveryFactory
- java.lang.Object
-
- org.apache.flink.kubernetes.highavailability.KubernetesCheckpointRecoveryFactory
-
- All Implemented Interfaces:
CheckpointRecoveryFactory
public class KubernetesCheckpointRecoveryFactory extends Object implements CheckpointRecoveryFactory
Factory to createCompletedCheckpointStore
andCheckpointIDCounter
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CheckpointIDCounter
createCheckpointIDCounter(JobID jobID)
Creates aCheckpointIDCounter
instance for a job.CompletedCheckpointStore
createRecoveredCompletedCheckpointStore(JobID jobID, int maxNumberOfCheckpointsToRetain, SharedStateRegistryFactory sharedStateRegistryFactory, Executor ioExecutor, RecoveryClaimMode recoveryClaimMode)
Creates a RECOVEREDCompletedCheckpointStore
instance for a job.static KubernetesCheckpointRecoveryFactory
withLeadershipValidation(FlinkKubeClient kubeClient, Configuration configuration, Executor executor, String clusterId, Function<JobID,String> function, String lockIdentity)
static KubernetesCheckpointRecoveryFactory
withoutLeadershipValidation(FlinkKubeClient kubeClient, Configuration configuration, Executor executor, String clusterId, Function<JobID,String> function)
-
-
-
Method Detail
-
createRecoveredCompletedCheckpointStore
public CompletedCheckpointStore createRecoveredCompletedCheckpointStore(JobID jobID, int maxNumberOfCheckpointsToRetain, SharedStateRegistryFactory sharedStateRegistryFactory, Executor ioExecutor, RecoveryClaimMode recoveryClaimMode) throws Exception
Description copied from interface:CheckpointRecoveryFactory
Creates a RECOVEREDCompletedCheckpointStore
instance for a job. In this context, RECOVERED means, that if we already have completed checkpoints from previous runs, we should use them as the initial state.- Specified by:
createRecoveredCompletedCheckpointStore
in interfaceCheckpointRecoveryFactory
- Parameters:
jobID
- Job ID to recover checkpoints formaxNumberOfCheckpointsToRetain
- Maximum number of checkpoints to retainsharedStateRegistryFactory
- Simple factory to produceSharedStateRegistry
objects.ioExecutor
- Executor used to run (async) deletes.recoveryClaimMode
- the claim mode with which the job is restoring.- Returns:
CompletedCheckpointStore
instance for the job- Throws:
Exception
-
createCheckpointIDCounter
public CheckpointIDCounter createCheckpointIDCounter(JobID jobID) throws Exception
Description copied from interface:CheckpointRecoveryFactory
Creates aCheckpointIDCounter
instance for a job.- Specified by:
createCheckpointIDCounter
in interfaceCheckpointRecoveryFactory
- Parameters:
jobID
- Job ID to recover checkpoints for- Returns:
CheckpointIDCounter
instance for the job- Throws:
Exception
-
withLeadershipValidation
public static KubernetesCheckpointRecoveryFactory withLeadershipValidation(FlinkKubeClient kubeClient, Configuration configuration, Executor executor, String clusterId, Function<JobID,String> function, String lockIdentity)
-
withoutLeadershipValidation
public static KubernetesCheckpointRecoveryFactory withoutLeadershipValidation(FlinkKubeClient kubeClient, Configuration configuration, Executor executor, String clusterId, Function<JobID,String> function)
-
-