Hi Shailesh,

sharing state across operators is not possible. However, you could emit the state (or parts of it) as a stream element to downstream operators by having a function that emits a type like "Either<MyElement,List<MyState>>".

Another option would be to use side outputs to send state to downstream operators [0].

Maybe you can tell use a bit more about what you want to achieve?

Regards,
Timo

[0] https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/stream/side_output.html


Am 12/5/17 um 11:58 AM schrieb Shailesh Jain:
Hi,

Is it possible to share state across operators in Flink?

I have CoFlatMap operator which maintains a ListState and returns a DataStream. And downstream there is a KafkaSink operator for the same DataStream which needs to access the ListState.

Thanks,
Shailesh


Reply via email to