pnowojski commented on code in PR #21245:
URL: https://github.com/apache/flink/pull/21245#discussion_r1016303017
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/CheckpointConfig.java:
##########
@@ -154,30 +143,19 @@ public class CheckpointConfig implements
java.io.Serializable {
public CheckpointConfig(final CheckpointConfig checkpointConfig) {
checkNotNull(checkpointConfig);
- this.checkpointInterval = checkpointConfig.checkpointInterval;
- this.checkpointingMode = checkpointConfig.checkpointingMode;
- this.checkpointTimeout = checkpointConfig.checkpointTimeout;
- this.maxConcurrentCheckpoints =
checkpointConfig.maxConcurrentCheckpoints;
- this.minPauseBetweenCheckpoints =
checkpointConfig.minPauseBetweenCheckpoints;
- this.tolerableCheckpointFailureNumber =
checkpointConfig.tolerableCheckpointFailureNumber;
- this.unalignedCheckpointsEnabled =
checkpointConfig.isUnalignedCheckpointsEnabled();
- this.alignedCheckpointTimeout =
checkpointConfig.alignedCheckpointTimeout;
- this.approximateLocalRecovery =
checkpointConfig.isApproximateLocalRecoveryEnabled();
- this.externalizedCheckpointCleanup =
checkpointConfig.externalizedCheckpointCleanup;
- this.forceCheckpointing = checkpointConfig.forceCheckpointing;
- this.forceUnalignedCheckpoints =
checkpointConfig.forceUnalignedCheckpoints;
+ this.configuration = new Configuration(checkpointConfig.configuration);
this.storage = checkpointConfig.getCheckpointStorage();
- this.checkpointIdOfIgnoredInFlightData =
- checkpointConfig.getCheckpointIdOfIgnoredInFlightData();
}
- public CheckpointConfig() {}
+ public CheckpointConfig() {
+ configuration = new Configuration();
+ }
// ------------------------------------------------------------------------
/** Disables checkpointing. */
public void disableCheckpointing() {
- this.checkpointInterval = -1;
+
configuration.removeConfig(ExecutionCheckpointingOptions.CHECKPOINTING_INTERVAL);
Review Comment:
In the offline discussion we decided to leave it as it was (with the
`removeConfig` option), and deal with it later, if it causes a problem.
- @twalthr didn't want to change the returned value from
`StreamExecutionEnvironment` and `CheckpointConfig` to `0`
- I didn't want to have `StreamExecutionEnvironment` and `CheckpointConfig`
to return `-1` while `ConfigOption` return `0`
- Adding support for negative values in the `ConfigOption` would be
problematic, as it would have to be done in such way, that all already existing
`ConfigOption` would have to fail/reject negative values.
--
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]