public class CheckpointProperties extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
boolean |
discardOnJobCancelled()
Returns whether the checkpoint should be discarded when the owning job
reaches the
JobStatus.CANCELED state. |
boolean |
discardOnJobFailed()
Returns whether the checkpoint should be discarded when the owning job
reaches the
JobStatus.FAILED state. |
boolean |
discardOnJobFinished()
Returns whether the checkpoint should be discarded when the owning job
reaches the
JobStatus.FINISHED state. |
boolean |
discardOnJobSuspended()
Returns whether the checkpoint should be discarded when the owning job
reaches the
JobStatus.SUSPENDED state. |
boolean |
discardOnSubsumed()
Returns whether the checkpoint should be discarded when it is subsumed.
|
boolean |
equals(Object o) |
boolean |
externalizeCheckpoint()
Returns whether the checkpoint should be persisted externally.
|
boolean |
forceCheckpoint()
Returns whether the checkpoint should be forced.
|
static CheckpointProperties |
forExternalizedCheckpoint(boolean deleteOnCancellation)
Creates the checkpoint properties for an external checkpoint.
|
static CheckpointProperties |
forStandardCheckpoint()
Creates the checkpoint properties for a regular checkpoint.
|
static CheckpointProperties |
forStandardSavepoint()
Creates the checkpoint properties for a (manually triggered) savepoint.
|
int |
hashCode() |
static boolean |
isSavepoint(CheckpointProperties props)
Returns whether the checkpoint properties describe a standard savepoint.
|
String |
toString() |
public boolean forceCheckpoint()
Forced checkpoints ignore the configured maximum number of concurrent checkpoints and minimum time between checkpoints. Furthermore, they are not subsumed by more recent checkpoints as long as they are pending.
true
if the checkpoint should be forced;
false
otherwise.CheckpointCoordinator
,
PendingCheckpoint
public boolean externalizeCheckpoint()
true
if the checkpoint should be persisted
externally; false
otherwise.PendingCheckpoint
public boolean discardOnSubsumed()
A checkpoint is subsumed when the maximum number of retained checkpoints is reached and a more recent checkpoint completes..
true
if the checkpoint should be discarded when it
is subsumed; false
otherwise.CompletedCheckpointStore
public boolean discardOnJobFinished()
JobStatus.FINISHED
state.true
if the checkpoint should be discarded when the
owning job reaches the JobStatus.FINISHED
state; false
otherwise.CompletedCheckpointStore
public boolean discardOnJobCancelled()
JobStatus.CANCELED
state.true
if the checkpoint should be discarded when the
owning job reaches the JobStatus.CANCELED
state; false
otherwise.CompletedCheckpointStore
public boolean discardOnJobFailed()
JobStatus.FAILED
state.true
if the checkpoint should be discarded when the
owning job reaches the JobStatus.FAILED
state; false
otherwise.CompletedCheckpointStore
public boolean discardOnJobSuspended()
JobStatus.SUSPENDED
state.true
if the checkpoint should be discarded when the
owning job reaches the JobStatus.SUSPENDED
state; false
otherwise.CompletedCheckpointStore
public static CheckpointProperties forStandardSavepoint()
Savepoints are forced and persisted externally. They have to be garbage collected manually.
public static CheckpointProperties forStandardCheckpoint()
Regular checkpoints are not forced and not persisted externally. They are garbage collected automatically.
public static CheckpointProperties forExternalizedCheckpoint(boolean deleteOnCancellation)
External checkpoints are not forced, but persisted externally. 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.
deleteOnCancellation
- Flag indicating whether to discard on cancellation.public static boolean isSavepoint(CheckpointProperties props)
props
- Checkpoint properties to check.true
if the properties describe a savepoint, false
otherwise.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.