[ https://issues.apache.org/jira/browse/FLINK-16556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17395709#comment-17395709 ]
Liebing Yu commented on FLINK-16556: ------------------------------------ I have a question: why more changes are needed to use parallel source. As for whether the Random instance needs to be serialized, I think it has no effect on the calculation of the entire example from a functional point of view. But from the perspective of the completeness of the example, I think it is necessary, because Random is a stateful field, and we should persist its state in a stateful operator. > TopSpeedWindowing should implement checkpointing for its source > --------------------------------------------------------------- > > Key: FLINK-16556 > URL: https://issues.apache.org/jira/browse/FLINK-16556 > Project: Flink > Issue Type: Bug > Components: Examples > Affects Versions: 1.10.0 > Reporter: Nico Kruber > Assignee: Liebing Yu > Priority: Minor > Labels: auto-deprioritized-major, starter > > {\{org.apache.flink.streaming.examples.windowing.TopSpeedWindowing.CarSource}} > does not implement checkpointing of its state, namely the current speeds and > distances per car. The main problem with this is that the window trigger only > fires if the new distance has increased by at least 50 but after restore, it > will be reset to 0 and could thus not produce output for a while. > > Either the distance calculation could use {{Math.abs}} or the source needs > proper checkpointing. Optionally with allowing the number of cars to > increase/decrease. -- This message was sent by Atlassian Jira (v8.3.4#803005)