You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by M Singh <ma...@yahoo.com> on 2019/07/14 13:07:27 UTC
Apache Flink - Manipulating the state of an object in an evictor or
trigger
Hi:
Is it safe to manipulate the state of an object in the evictor or trigger ? Are there any best practices/dos and don't on this ?
Thanks
Re: Apache Flink - Manipulating the state of an object in an evictor
or trigger
Posted by taher koitawala <ta...@gmail.com>.
As far as I know. It is completely safe
On Fri, Jul 19, 2019, 1:35 AM M Singh <ma...@yahoo.com> wrote:
> Just wanted to see if there is any advice on this question. Thanks
>
> On Sunday, July 14, 2019, 09:07:45 AM EDT, M Singh <ma...@yahoo.com>
> wrote:
>
>
> Hi:
>
> Is it safe to manipulate the state of an object in the evictor or trigger
> ? Are there any best practices/dos and don't on this ?
>
> Thanks
>
Re: Apache Flink - Manipulating the state of an object in an
evictor or trigger
Posted by M Singh <ma...@yahoo.com>.
Just wanted to see if there is any advice on this question. Thanks
On Sunday, July 14, 2019, 09:07:45 AM EDT, M Singh <ma...@yahoo.com> wrote:
Hi:
Is it safe to manipulate the state of an object in the evictor or trigger ? Are there any best practices/dos and don't on this ?
Thanks
Re: Apache Flink - Manipulating the state of an object in an
evictor or trigger
Posted by M Singh <ma...@yahoo.com>.
Biao:
I am asking this question, just to understand the impact and best practices around it. The state I am referring to it the objects that are passed to evictor.
https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/operators/windows.html#evictors
void evictBefore(Iterable<TimestampedValue<T>> elements, int size, W window, EvictorContext evictorContext);
And you are right, I also don't see this in this information in the docs. That is the reason I wanted to find out.
Thanks again for your time.
Mans
On Friday, July 19, 2019, 02:15:02 AM EDT, Biao Liu <mm...@gmail.com> wrote:
Hi,
I don't find any official document about it.
There are several state relevant methods in `TriggerContext`. I believe it's absolutely safe to use state in `Trigger` through `TriggerContext`.
Regarding to `Evictor`, there is no such methods in `EvictorContext`. After taking a glance on relevant codes, I guess it's OK for now. But I suggest do not manipulate state in `Evictor` until there is an official guarantee.
BTW, I'm just wondering why do you want to manipulate state in `Evictor`? If your requirement is reasonable, maybe we could support it officially.
M Singh <ma...@yahoo.com> 于2019年7月14日周日 下午9:07写道:
Hi:
Is it safe to manipulate the state of an object in the evictor or trigger ? Are there any best practices/dos and don't on this ?
Thanks
Re: Apache Flink - Manipulating the state of an object in an evictor
or trigger
Posted by Biao Liu <mm...@gmail.com>.
Hi,
I don't find any official document about it.
There are several state relevant methods in `TriggerContext`. I believe
it's absolutely safe to use state in `Trigger` through `TriggerContext`.
Regarding to `Evictor`, there is no such methods in `EvictorContext`. After
taking a glance on relevant codes, I guess it's OK for now. But I suggest
do not manipulate state in `Evictor` until there is an official guarantee.
BTW, I'm just wondering why do you want to manipulate state in `Evictor`?
If your requirement is reasonable, maybe we could support it officially.
M Singh <ma...@yahoo.com> 于2019年7月14日周日 下午9:07写道:
> Hi:
>
> Is it safe to manipulate the state of an object in the evictor or trigger
> ? Are there any best practices/dos and don't on this ?
>
> Thanks
>