zentol commented on code in PR #21245:
URL: https://github.com/apache/flink/pull/21245#discussion_r1015351612
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/CheckpointConfig.java:
##########
@@ -588,23 +581,26 @@ public Duration getAlignmentTimeout() {
*/
@PublicEvolving
public Duration getAlignedCheckpointTimeout() {
- return alignedCheckpointTimeout;
+ return
configuration.get(ExecutionCheckpointingOptions.ALIGNED_CHECKPOINT_TIMEOUT);
}
/**
- * Only relevant if {@link #unalignedCheckpointsEnabled} is enabled.
+ * Only relevant if {@link #isUnalignedCheckpointsEnabled} is enabled.
Review Comment:
```suggestion
* Only relevant if {@link
ExecutionCheckpointingOptions.ENABLE_UNALIGNED} is enabled.
```
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/CheckpointConfig.java:
##########
@@ -186,7 +164,7 @@ public void disableCheckpointing() {
* @return True if checkpointing is enables, false otherwise.
*/
public boolean isCheckpointingEnabled() {
- return checkpointInterval > 0;
+ return
configuration.contains(ExecutionCheckpointingOptions.CHECKPOINTING_INTERVAL);
Review Comment:
Note: long-term we may want to decouple checkpointing being enabled from the
interval, in case a user wants to fully control checkpoints from the outside.
(Which you currently _can_ by setting to Long.MAX_VALUE but it's a bit weird)
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/CheckpointConfig.java:
##########
@@ -66,85 +68,72 @@ public class CheckpointConfig implements
java.io.Serializable {
private static final Logger LOG =
LoggerFactory.getLogger(CheckpointConfig.class);
/** The default checkpoint mode: exactly once. */
- public static final CheckpointingMode DEFAULT_MODE =
CheckpointingMode.EXACTLY_ONCE;
+ public static final CheckpointingMode DEFAULT_MODE =
+ ExecutionCheckpointingOptions.CHECKPOINTING_MODE.defaultValue();
/** The default timeout of a checkpoint attempt: 10 minutes. */
- public static final long DEFAULT_TIMEOUT = 10 * 60 * 1000;
+ @Deprecated
+ public static final long DEFAULT_TIMEOUT =
+
ExecutionCheckpointingOptions.CHECKPOINTING_TIMEOUT.defaultValue().toMillis();
/** The default minimum pause to be made between checkpoints: none. */
- public static final long DEFAULT_MIN_PAUSE_BETWEEN_CHECKPOINTS = 0;
+ @Deprecated
+ public static final long DEFAULT_MIN_PAUSE_BETWEEN_CHECKPOINTS =
Review Comment:
add a deprecation note to use the config options instead.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]