Class CheckpointProperties
java.lang.Object
org.apache.flink.runtime.checkpoint.CheckpointProperties
- All Implemented Interfaces:
Serializable
The configuration of a checkpoint. This describes whether
- The checkpoint is s regular checkpoint or a savepoint.
- When the checkpoint should be garbage collected.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCheckpointProperties(boolean forced, SnapshotType checkpointType, boolean discardSubsumed, boolean discardFinished, boolean discardCancelled, boolean discardFailed, boolean discardSuspended, boolean unclaimed) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic CheckpointPropertiesCreates the checkpoint properties for a checkpoint.static CheckpointPropertiesforSavepoint(boolean forced, org.apache.flink.core.execution.SavepointFormatType formatType) Creates the checkpoint properties for a (manually triggered) savepoint.static CheckpointPropertiesforSyncSavepoint(boolean forced, boolean terminate, org.apache.flink.core.execution.SavepointFormatType formatType) static CheckpointPropertiesCreates the checkpoint properties for a snapshot restored inRecoveryClaimMode.NO_CLAIM.Gets the type of the checkpoint (checkpoint / savepoint).inthashCode()booleanReturns whether the checkpoint properties describe a standard savepoint.booleanReturns whether the checkpoint properties describe a synchronous savepoint/checkpoint.booleanReturns whether the checkpoint should be restored in aRecoveryClaimMode.NO_CLAIMmode.toString()
-
Constructor Details
-
CheckpointProperties
public CheckpointProperties(boolean forced, SnapshotType checkpointType, boolean discardSubsumed, boolean discardFinished, boolean discardCancelled, boolean discardFailed, boolean discardSuspended, boolean unclaimed)
-
-
Method Details
-
isUnclaimed
public boolean isUnclaimed()Returns whether the checkpoint should be restored in aRecoveryClaimMode.NO_CLAIMmode. -
getCheckpointType
Gets the type of the checkpoint (checkpoint / savepoint). -
isSavepoint
public boolean isSavepoint()Returns whether the checkpoint properties describe a standard savepoint.- Returns:
trueif the properties describe a savepoint,falseotherwise.
-
isSynchronous
public boolean isSynchronous()Returns whether the checkpoint properties describe a synchronous savepoint/checkpoint.- Returns:
trueif the properties describe a synchronous operation,falseotherwise.
-
equals
-
hashCode
public int hashCode() -
toString
-
forSavepoint
public static CheckpointProperties forSavepoint(boolean forced, org.apache.flink.core.execution.SavepointFormatType formatType) Creates the checkpoint properties for a (manually triggered) savepoint.Savepoints are not queued due to time trigger limits. They have to be garbage collected manually.
- Returns:
- Checkpoint properties for a (manually triggered) savepoint.
-
forUnclaimedSnapshot
Creates the checkpoint properties for a snapshot restored inRecoveryClaimMode.NO_CLAIM. Those properties should not be used when triggering a checkpoint/savepoint. They're useful when restoring aCompletedCheckpointStoreafter a JM failover.- Returns:
- Checkpoint properties for a snapshot restored in
RecoveryClaimMode.NO_CLAIM.
-
forSyncSavepoint
public static CheckpointProperties forSyncSavepoint(boolean forced, boolean terminate, org.apache.flink.core.execution.SavepointFormatType formatType) -
forCheckpoint
Creates the checkpoint properties for a checkpoint.Checkpoints may be queued in case too many other checkpoints are currently happening. They are garbage collected automatically, except when the owning job terminates in state
JobStatus.FAILED. The user is required to configure the clean up behaviour on job cancellation.- Returns:
- Checkpoint properties for an external checkpoint.
-