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
SimpleCheckpointRecoveryFactory
which creates and keeps separateCompletedCheckpointStore
andCheckpointIDCounter
for eachJobID
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
PerJobCheckpointRecoveryFactory.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 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 <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(JobID jobId, int maxNumberOfCheckpointsToRetain, SharedStateRegistryFactory sharedStateRegistryFactory, Executor ioExecutor, RecoveryClaimMode recoveryClaimMode)
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
-
createCheckpointIDCounter
public CheckpointIDCounter createCheckpointIDCounter(JobID jobId)
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
-
-