State sharing across trigger and evictor

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

State sharing across trigger and evictor

Jayant Ameta
Hi,
I'm using the GlobalWindow with a custom CountTrigger (similar to the CountTrigger provided by flink).
I'm also using an evictor to remove some of the elements from the window. Is it possible to update the count when an element is evicted? For example: can I access the ReducingState used by the countTrigger from my Evictor class, so that the count always reflects the number of elements in the windows?

Jayant Ameta
Reply | Threaded
Open this post in threaded view
|

Re: State sharing across trigger and evictor

Fabian Hueske-2
Hi,

I don't think that is possible.
The Evictor interface does not provide access to a state store, so there is no way to access state.

Best, Fabian

2018-07-10 13:26 GMT+02:00 Jayant Ameta <[hidden email]>:
Hi,
I'm using the GlobalWindow with a custom CountTrigger (similar to the CountTrigger provided by flink).
I'm also using an evictor to remove some of the elements from the window. Is it possible to update the count when an element is evicted? For example: can I access the ReducingState used by the countTrigger from my Evictor class, so that the count always reflects the number of elements in the windows?

Jayant Ameta

Reply | Threaded
Open this post in threaded view
|

Re: State sharing across trigger and evictor

vino yang
Hi Jayant,

As Fabian said, Evictor can not access flink state. But if you really has your own requirement. You can try to customize a special trigger (with evictor function), may be that could match your requirement.

Thanks.
vino.

2018-07-16 17:17 GMT+08:00 Fabian Hueske <[hidden email]>:
Hi,

I don't think that is possible.
The Evictor interface does not provide access to a state store, so there is no way to access state.

Best, Fabian

2018-07-10 13:26 GMT+02:00 Jayant Ameta <[hidden email]>:
Hi,
I'm using the GlobalWindow with a custom CountTrigger (similar to the CountTrigger provided by flink).
I'm also using an evictor to remove some of the elements from the window. Is it possible to update the count when an element is evicted? For example: can I access the ReducingState used by the countTrigger from my Evictor class, so that the count always reflects the number of elements in the windows?

Jayant Ameta