Class PerJobCheckpointRecoveryFactory<T extends CompletedCheckpointStore>
- java.lang.Object
-
- org.apache.flink.runtime.checkpoint.PerJobCheckpointRecoveryFactory<T>
-
- All Implemented Interfaces:
CheckpointRecoveryFactory
public class PerJobCheckpointRecoveryFactory<T extends CompletedCheckpointStore> extends Object implements CheckpointRecoveryFactory
SimpleCheckpointRecoveryFactorywhich creates and keeps separateCompletedCheckpointStoreandCheckpointIDCounterfor eachJobID.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePerJobCheckpointRecoveryFactory.CheckpointStoreRecoveryHelper<StoreType extends CompletedCheckpointStore>Restores or creates aCompletedCheckpointStore, optionally using an existing one.
-
Constructor Summary
Constructors Constructor Description PerJobCheckpointRecoveryFactory(PerJobCheckpointRecoveryFactory.CheckpointStoreRecoveryHelper<T> checkpointStoreRecoveryHelper)PerJobCheckpointRecoveryFactory(PerJobCheckpointRecoveryFactory.CheckpointStoreRecoveryHelper<T> checkpointStoreRecoveryHelper, Supplier<CheckpointIDCounter> checkpointIDCounterPerJobFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CheckpointIDCountercreateCheckpointIDCounter(org.apache.flink.api.common.JobID jobId)Creates aCheckpointIDCounterinstance for a job.CompletedCheckpointStorecreateRecoveredCompletedCheckpointStore(org.apache.flink.api.common.JobID jobId, int maxNumberOfCheckpointsToRetain, SharedStateRegistryFactory sharedStateRegistryFactory, Executor ioExecutor, org.apache.flink.core.execution.RecoveryClaimMode recoveryClaimMode)Creates a RECOVEREDCompletedCheckpointStoreinstance for a job.static <T extends CompletedCheckpointStore>
CheckpointRecoveryFactorywithoutCheckpointStoreRecovery(IntFunction<T> storeFn)
-
-
-
Constructor Detail
-
PerJobCheckpointRecoveryFactory
public PerJobCheckpointRecoveryFactory(PerJobCheckpointRecoveryFactory.CheckpointStoreRecoveryHelper<T> checkpointStoreRecoveryHelper)
-
PerJobCheckpointRecoveryFactory
public PerJobCheckpointRecoveryFactory(PerJobCheckpointRecoveryFactory.CheckpointStoreRecoveryHelper<T> checkpointStoreRecoveryHelper, Supplier<CheckpointIDCounter> checkpointIDCounterPerJobFactory)
-
-
Method Detail
-
withoutCheckpointStoreRecovery
@VisibleForTesting public static <T extends CompletedCheckpointStore> CheckpointRecoveryFactory withoutCheckpointStoreRecovery(IntFunction<T> storeFn)
-
createRecoveredCompletedCheckpointStore
public CompletedCheckpointStore createRecoveredCompletedCheckpointStore(org.apache.flink.api.common.JobID jobId, int maxNumberOfCheckpointsToRetain, SharedStateRegistryFactory sharedStateRegistryFactory, Executor ioExecutor, org.apache.flink.core.execution.RecoveryClaimMode recoveryClaimMode)
Description copied from interface:CheckpointRecoveryFactoryCreates a RECOVEREDCompletedCheckpointStoreinstance 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:
createRecoveredCompletedCheckpointStorein interfaceCheckpointRecoveryFactory- Parameters:
jobId- Job ID to recover checkpoints formaxNumberOfCheckpointsToRetain- Maximum number of checkpoints to retainsharedStateRegistryFactory- Simple factory to produceSharedStateRegistryobjects.ioExecutor- Executor used to run (async) deletes.recoveryClaimMode- the claim mode with which the job is restoring.- Returns:
CompletedCheckpointStoreinstance for the job
-
createCheckpointIDCounter
public CheckpointIDCounter createCheckpointIDCounter(org.apache.flink.api.common.JobID jobId)
Description copied from interface:CheckpointRecoveryFactoryCreates aCheckpointIDCounterinstance for a job.- Specified by:
createCheckpointIDCounterin interfaceCheckpointRecoveryFactory- Parameters:
jobId- Job ID to recover checkpoints for- Returns:
CheckpointIDCounterinstance for the job
-
-