Hi Allen,
>From my experience, you can do your init setup by the following 2 ways:

1. Do your init setup in RichFunction#open method, see [1] for details.
2. Do your init setup in static block, it will be executed when the class
is loaded.

[1]
https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/user_defined_functions/#rich-functions

Best,
Lijie

Allen Zoo <alinz...@gmail.com> 于2022年8月2日周二 16:11写道:

> Hi all,
> We went to do some init env setup before the flink task run, And we have
> noticed the Task Lifecycle | Apache Flink
> <https://nightlies.apache.org/flink/flink-docs-master/docs/internals/task_lifecycle/>
>  doc
> described, but we can't find  listener/hook/SPI interface do some custom
> init jobs before task  running. Does flink now have relevant interfaces ?
>

Reply via email to