[
https://issues.apache.org/jira/browse/FLINK-5823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16320579#comment-16320579
]
ASF GitHub Bot commented on FLINK-5823:
---------------------------------------
Github user StefanRRichter commented on a diff in the pull request:
https://github.com/apache/flink/pull/5248#discussion_r160713950
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointProperties.java
---
@@ -251,77 +225,66 @@ public String toString() {
false,
false);
- private static final CheckpointProperties STANDARD_CHECKPOINT = new
CheckpointProperties(
- false,
+ private static final CheckpointProperties CHECKPOINT_NEVER_RETAINED =
new CheckpointProperties(
false,
false,
true,
- true,
- true,
- true,
- true);
+ true, // Delete on success
+ true, // Delete on cancellation
+ true, // Delete on failure
+ true); // Delete on suspension
- private static final CheckpointProperties
EXTERNALIZED_CHECKPOINT_RETAINED = new CheckpointProperties(
+ private static final CheckpointProperties
CHECKPOINT_RETAINED_ON_FAILURE = new CheckpointProperties(
false,
- true,
false,
true,
- true,
- false, // Retain on cancellation
- false,
- false); // Retain on suspension
+ true, // Delete on success
+ true, // Delete on cancellation
+ false, // Retain on failure
+ true); // Delete on suspension
- private static final CheckpointProperties
EXTERNALIZED_CHECKPOINT_DELETED = new CheckpointProperties(
+ private static final CheckpointProperties
CHECKPOINT_RETAINED_ON_CANCELLATION = new CheckpointProperties(
false,
- true,
false,
true,
- true,
- true, // Delete on cancellation
- false,
- true); // Delete on suspension
+ true, // Delete on success
+ false, // Retain on cancellation
+ false, // Retain on failure
+ false); // Retain on suspension
+
/**
* Creates the checkpoint properties for a (manually triggered)
savepoint.
*
- * <p>Savepoints are forced and persisted externally. They have to be
+ * <p>Savepoints are not queued due to time trigger limits. They have
to be
* garbage collected manually.
*
* @return Checkpoint properties for a (manually triggered) savepoint.
*/
- public static CheckpointProperties forStandardSavepoint() {
- return STANDARD_SAVEPOINT;
- }
-
- /**
- * Creates the checkpoint properties for a regular checkpoint.
- *
- * <p>Regular checkpoints are not forced and not persisted externally.
They
- * are garbage collected automatically.
- *
- * @return Checkpoint properties for a regular checkpoint.
- */
- public static CheckpointProperties forStandardCheckpoint() {
- return STANDARD_CHECKPOINT;
+ public static CheckpointProperties forSavepoint() {
+ return SAVEPOINT;
}
/**
- * Creates the checkpoint properties for an external checkpoint.
+ * Creates the checkpoint properties for a checkpoint.
*
- * <p>External checkpoints are not forced, but persisted externally.
They
- * are garbage collected automatically, except when the owning job
+ * <p>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 {@link JobStatus#FAILED}. The user is required to
* configure the clean up behaviour on job cancellation.
*
- * @param deleteOnCancellation Flag indicating whether to discard on
cancellation.
- *
* @return Checkpoint properties for an external checkpoint.
*/
- public static CheckpointProperties forExternalizedCheckpoint(boolean
deleteOnCancellation) {
- if (deleteOnCancellation) {
- return EXTERNALIZED_CHECKPOINT_DELETED;
- } else {
- return EXTERNALIZED_CHECKPOINT_RETAINED;
+ public static CheckpointProperties
forCheckpoint(CheckpointRetentionPolicy policy) {
--- End diff --
I suggest changing the method name to `forPolicy(...)` or
`forRetentionPolicy(...)`.
> Store Checkpoint Root Metadata in StateBackend (not in HA custom store)
> -----------------------------------------------------------------------
>
> Key: FLINK-5823
> URL: https://issues.apache.org/jira/browse/FLINK-5823
> Project: Flink
> Issue Type: Sub-task
> Components: State Backends, Checkpointing
> Reporter: Stephan Ewen
> Assignee: Stephan Ewen
> Priority: Blocker
> Fix For: 1.5.0
>
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)