Hi Ken,

The documentation page describes that first the state is restored /
initialized and then the function's open() method is called [1].
I had a look at the code and it looks like the docs are correct [2]

Best, Fabian

[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.4/internals/task_lifecycle.html#normal-execution
[2]
https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java#L296

2018-03-20 0:49 GMT+01:00 Ken Krugler <kkrugler_li...@transpac.com>:

> Hi all,
>
> If I implement ListCheckpointed in a function, is there a guarantee that
> open() is called before restoreState()?
>
> Asking because it doesn’t seem to be the case, and I didn’t notice this
> being described here:
>
> https://ci.apache.org/projects/flink/flink-docs-
> release-1.4/internals/task_lifecycle.html
>
> If so, then is it normally best practice to also implement
> the CheckpointedFunction interface, so that initializeState() method is
> called before the restore?
>
> In Flink test code, I don’t see this typically being done.
>
> Thanks,
>
> — Ken
>
> --------------------------
> Ken Krugler
> http://www.scaleunlimited.com
> custom big data solutions & training
> Hadoop, Cascading, Cassandra & Solr
>
>

Reply via email to