public class CheckpointProperties extends Object implements Serializable
Constructor and Description |
---|
CheckpointProperties(boolean forced,
SnapshotType checkpointType,
boolean discardSubsumed,
boolean discardFinished,
boolean discardCancelled,
boolean discardFailed,
boolean discardSuspended,
boolean unclaimed) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static CheckpointProperties |
forCheckpoint(CheckpointRetentionPolicy policy)
Creates the checkpoint properties for a checkpoint.
|
static CheckpointProperties |
forSavepoint(boolean forced,
SavepointFormatType formatType)
Creates the checkpoint properties for a (manually triggered) savepoint.
|
static CheckpointProperties |
forSyncSavepoint(boolean forced,
boolean terminate,
SavepointFormatType formatType) |
static CheckpointProperties |
forUnclaimedSnapshot()
Creates the checkpoint properties for a snapshot restored in
RestoreMode.NO_CLAIM . |
SnapshotType |
getCheckpointType()
Gets the type of the checkpoint (checkpoint / savepoint).
|
int |
hashCode() |
boolean |
isSavepoint()
Returns whether the checkpoint properties describe a standard savepoint.
|
boolean |
isSynchronous()
Returns whether the checkpoint properties describe a synchronous savepoint/checkpoint.
|
boolean |
isUnclaimed()
Returns whether the checkpoint should be restored in a
RestoreMode.NO_CLAIM mode. |
String |
toString() |
public CheckpointProperties(boolean forced, SnapshotType checkpointType, boolean discardSubsumed, boolean discardFinished, boolean discardCancelled, boolean discardFailed, boolean discardSuspended, boolean unclaimed)
public boolean isUnclaimed()
RestoreMode.NO_CLAIM
mode.public SnapshotType getCheckpointType()
public boolean isSavepoint()
true
if the properties describe a savepoint, false
otherwise.public boolean isSynchronous()
true
if the properties describe a synchronous operation, false
otherwise.public static CheckpointProperties forSavepoint(boolean forced, SavepointFormatType formatType)
Savepoints are not queued due to time trigger limits. They have to be garbage collected manually.
public static CheckpointProperties forUnclaimedSnapshot()
RestoreMode.NO_CLAIM
.
Those properties should not be used when triggering a checkpoint/savepoint. They're useful
when restoring a CompletedCheckpointStore
after a JM failover.RestoreMode.NO_CLAIM
.public static CheckpointProperties forSyncSavepoint(boolean forced, boolean terminate, SavepointFormatType formatType)
public static CheckpointProperties forCheckpoint(CheckpointRetentionPolicy policy)
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.
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.