dawidwys commented on a change in pull request #18086:
URL: https://github.com/apache/flink/pull/18086#discussion_r770537322
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointOptions.java
##########
@@ -73,30 +73,29 @@ public static CheckpointOptions alignedNoTimeout(
type, location, AlignmentType.ALIGNED,
NO_ALIGNED_CHECKPOINT_TIME_OUT);
}
- public static CheckpointOptions
unaligned(CheckpointStorageLocationReference location) {
+ public static CheckpointOptions unaligned(
+ CheckpointType type, CheckpointStorageLocationReference location) {
+ checkArgument(!type.isSavepoint(), "Savepoints can not be unaligned");
return new CheckpointOptions(
- CheckpointType.CHECKPOINT,
- location,
- AlignmentType.UNALIGNED,
- NO_ALIGNED_CHECKPOINT_TIME_OUT);
+ type, location, AlignmentType.UNALIGNED,
NO_ALIGNED_CHECKPOINT_TIME_OUT);
}
public static CheckpointOptions alignedWithTimeout(
- CheckpointStorageLocationReference location, long
alignedCheckpointTimeout) {
+ CheckpointType type,
+ CheckpointStorageLocationReference location,
+ long alignedCheckpointTimeout) {
+ checkArgument(!type.isSavepoint(), "Savepoints can not be unaligned");
Review comment:
I also don't like the responsibilities of `CheckpointType` and
`CheckpointOptions`, but I fear it's a bit of a pandora box to change that
right now.
At the same time I felt it's not yet terrible... Not sure how to proceed
here :(
--
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]