use of org.apache.flink.runtime.checkpoint.EmbeddedCompletedCheckpointStore in project flink by apache.
the class DispatcherCleanupITCase method setUp.
@Before
public void setUp() throws Exception {
super.setUp();
haServices.setCheckpointRecoveryFactory(new PerJobCheckpointRecoveryFactory<EmbeddedCompletedCheckpointStore>((maxCheckpoints, previous, sharedStateRegistryFactory, ioExecutor) -> {
if (previous != null) {
// First job cleanup still succeeded for the
// CompletedCheckpointStore because the JobGraph cleanup happens
// after the JobManagerRunner closing
assertTrue(previous.getShutdownStatus().isPresent());
assertTrue(previous.getAllCheckpoints().isEmpty());
return new EmbeddedCompletedCheckpointStore(maxCheckpoints, previous.getAllCheckpoints(), sharedStateRegistryFactory.create(ioExecutor, previous.getAllCheckpoints()));
}
return new EmbeddedCompletedCheckpointStore(maxCheckpoints, Collections.emptyList(), sharedStateRegistryFactory.create(ioExecutor, Collections.emptyList()));
}));
}
Aggregations