Re: Re: Is there a way to find the age of an element in a Global window?

2019-01-21 Thread Manjusha Vuyyuru
Hi Kostas, I have a similar scenario where i have to clear window elements upon reaching some count or clear the elements if they are older than one hour. I'm using the below approach, just wanted to know if its the right way : DataStream> out = mappedFields .map(new

Re: Is there a way to find the age of an element in a Global window?

2019-01-18 Thread Kostas Kloudas
Hi Harshith, The evictor has 2 methods: void evictBefore(Iterable> elements, int size, W window, EvictorContext evictorContext); void evictAfter(Iterable> elements, int size, W window, EvictorContext evictorContext); In the iterables, you have access to the elements and their timestamps, and the

Re: Re: Is there a way to find the age of an element in a Global window?

2019-01-18 Thread Kumar Bolar, Harshith
Thanks. That makes sense :) From: Kostas Kloudas Date: Friday, 18 January 2019 at 8:25 PM To: Harshith Kumar Bolar Cc: "user@flink.apache.org" Subject: [External] Re: Is there a way to find the age of an element in a Global window? Hi Harshith, The evictor has 2 methods: void