use of org.apache.flink.runtime.state.ttl.mock.MockStateBackend in project flink by apache.
the class UnalignedCheckpointFailureHandlingITCase method configure.
private void configure(StreamExecutionEnvironment env, TestCheckpointStorage storage) {
// enable checkpointing but only via API
env.enableCheckpointing(Long.MAX_VALUE, CheckpointingMode.EXACTLY_ONCE);
env.getCheckpointConfig().setCheckpointStorage(storage);
// use non-snapshotting backend to test channel state persistence integration with
// checkpoint storage
env.setStateBackend(new MockStateBackend(MockSnapshotSupplier.EMPTY));
env.getCheckpointConfig().enableUnalignedCheckpoints();
// speed-up
env.getCheckpointConfig().setAlignedCheckpointTimeout(Duration.ZERO);
// failures are emitted by the storage
env.getCheckpointConfig().setTolerableCheckpointFailureNumber(Integer.MAX_VALUE);
// DoP > 1 is required for some barriers to lag
env.setParallelism(PARALLELISM);
// no chaining to have input channels (doesn't matter local or remote)
env.disableOperatorChaining();
}
use of org.apache.flink.runtime.state.ttl.mock.MockStateBackend in project flink by apache.
the class StateHandleReuseITCase method buildJob.
private TestJobWithDescription buildJob() throws Exception {
return TestJobBuilders.COMPLEX_GRAPH_BUILDER.build(sharedObjects, cfg -> {
}, env -> {
env.setParallelism(1);
env.enableCheckpointing(10);
env.setRestartStrategy(RestartStrategies.noRestart());
env.setStateBackend(new MockStateBackend(new SingleHandleSnapshotSupplier()));
// changelog backend doesn't work with the mock backend
env.enableChangelogStateBackend(false);
});
}
Aggregations