in rides-and-fares/src/solution/java/org/apache/flink/training/solutions/ridesandfares/RidesAndFaresSolution.java [99:121]
public static void main(String[] args) throws Exception {
RidesAndFaresSolution job =
new RidesAndFaresSolution(
new TaxiRideGenerator(),
new TaxiFareGenerator(),
new PrintSinkFunction<>());
// Setting up checkpointing so that the state can be explored with the State Processor API.
// Generally it's better to separate configuration settings from the code,
// but for this example it's convenient to have it here for running in the IDE.
Configuration conf = new Configuration();
conf.setString("state.backend", "filesystem");
conf.setString("state.checkpoints.dir", "file:///tmp/checkpoints");
conf.setString("execution.checkpointing.interval", "10s");
conf.setString(
"execution.checkpointing.externalized-checkpoint-retention",
"RETAIN_ON_CANCELLATION");
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(conf);
job.execute(env);
}