dmvk commented on a change in pull request #16652:
URL: https://github.com/apache/flink/pull/16652#discussion_r686751989
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/PerJobCheckpointRecoveryFactory.java
##########
@@ -61,6 +65,7 @@ public CheckpointIDCounter createCheckpointIDCounter(JobID
jobId) {
@VisibleForTesting
public static CheckpointRecoveryFactory useSameServicesForAllJobs(
CompletedCheckpointStore store, CheckpointIDCounter counter) {
- return new PerJobCheckpointRecoveryFactory(n -> store, () -> counter);
+ return new PerJobCheckpointRecoveryFactory(
+ (maxCheckpoints, previous) -> store, () -> counter);
Review comment:
I've managed to completely remove this. For tests that are not using
EmbbededCCS, I've added a new factory method to simplify the usage a little
bit. This seems to cover all of the current usages.
```java
@VisibleForTesting
public static <T extends CompletedCheckpointStore>
CheckpointRecoveryFactory withoutCheckpointStoreRecovery(
Function<Integer, T> storeFn) {
return new PerJobCheckpointRecoveryFactory<>(
(maxCheckpoints, previous) -> {
if (previous == null) {
throw new UnsupportedOperationException("Checkpoint
store recovery is not supported.");
}
return storeFn.apply(maxCheckpoints);
});
}
```
--
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]