Window contents are only purged from state if the Trigger says so or if the 
watermark passes the garbage collection horizon for a given window. With 
GlobalWindows, the GC horizon is never reached, that leaves Triggers.

You can create a Trigger that purges every time it fires by wrapping it in a 
PurgingTrigger, i.e.

.window(PurgingTrigger.of(<my trigger>))

Best,
Aljoscha

> On 13. Jul 2017, at 14:00, jad mad <jadmad0...@gmail.com> wrote:
> 
> Hi Prashant,
> 
> env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);
> 
> actually I could make my custom trigger to fire periodically.
> The problem is the element set stored in the iterable variable 
> is always uniform which is not what I'm expecting...
> 
> private static class MyWindowFunction_Window...
>          ...    
>        @Override
>         public void apply(Tuple tuple, W window, Iterable<MyClass> iterable,
>              ...
>              for(MyClass element : iterable)
> 
> does anyone have any idea on this?
> thanks a lot in advance,
> jad
> 
> 
> On Thu, Jul 13, 2017 at 10:55 AM, prashantnayak 
> <prash...@intellifylearning.com <mailto:prash...@intellifylearning.com>> 
> wrote:
> Hi
> 
> We've have custom operators using global windows and are using event time.
> 
> How are you specifying event time as the time characteristic?
> 
> Prashant
> 
> 
> 
> --
> View this message in context: 
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/global-window-trigger-tp14206p14239.html
>  
> <http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/global-window-trigger-tp14206p14239.html>
> Sent from the Apache Flink User Mailing List archive. mailing list archive at 
> Nabble.com.
> 

Reply via email to