Re: Doubt about window and count trigger

2015-11-27 Thread Stephan Ewen
), i.e., in your implementation, it will >>>>> only >>>>> trigger when 100 elements arrived. In order to trigger also when the >>>>> window >>>>> time expires, you have to register a timer (processing time or event time >>>>&

Re: Doubt about window and count trigger

2015-11-27 Thread Fabian Hueske
ontinue to assign elements to the >>>> window, even if the window was already evaluated. If you PURGE the window >>>> and an element arrives after that, a new window is created. >>>> > >>>> > To implement your trigger, you have to register a timer in the >>>

Re: Doubt about window and count trigger

2015-11-27 Thread Anwar Rizal
mer in the >>> onEvent() method with: >>> > ctx.registerEventTimeTimer(window.getEnd) >>> > You can to that in every onEvent() call, because the timer is always >>> overwritten. >>> > >>> > NOTE: you should use Flink’s ke

Re: Doubt about window and count trigger

2015-11-27 Thread Fabian Hueske
use Flink’s keyed-state (access via triggerContext) if >> you want to keep state such as the current count. >> > >> > Hope this helps. Please let me know if you have further questions. >> > Fabian >> > >> > >> > >> > >> > F

Re: Doubt about window and count trigger

2015-11-27 Thread Anwar Rizal
> > > NOTE: you should use Flink’s keyed-state (access via triggerContext) if > you want to keep state such as the current count. > > > > Hope this helps. Please let me know if you have further questions. > > Fabian > > > > > > > > > > F

Re: Doubt about window and count trigger

2015-11-27 Thread Aljoscha Krettek
such as the current count. > > Hope this helps. Please let me know if you have further questions. > Fabian > > > > > From: Matthias J. Sax > Sent: Friday, November 27, 2015 08:44 > To: user@flink.apache.org > Subject: Re: Doubt about window and count trig

RE: Doubt about window and count trigger

2015-11-27 Thread fhueske
you have further questions. Fabian From: Matthias J. Sax Sent: Friday, November 27, 2015 08:44 To: user@flink.apache.org Subject: Re: Doubt about window and count trigger Hi, a Trigger is an *additional* condition for intermediate (early) evaluation of the window. Thus, it is not "or-e

Re: Doubt about window and count trigger

2015-11-26 Thread Matthias J. Sax
Hi, a Trigger is an *additional* condition for intermediate (early) evaluation of the window. Thus, it is not "or-ed" to the basic window definition. If you want to have an or-ed window condition, you can customize it by specifying your own window definition. > dataStream.window(new MyOwnWindow(

Doubt about window and count trigger

2015-11-26 Thread Anwar Rizal
Hi all, >From the documentation: "The Trigger specifies when the function that comes after the window clause (e.g., sum, count) is evaluated (“fires”) for each window." So, basically, if I specify: keyedStream .window(TumblingTimeWindows.of(Time.of(5, TimeUnit.SECONDS)) .trigger(CountTri