Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DFC57200B8B for ; Tue, 4 Oct 2016 18:59:21 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DE744160AE8; Tue, 4 Oct 2016 16:59:21 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CFA11160AC7 for ; Tue, 4 Oct 2016 18:59:20 +0200 (CEST) Received: (qmail 43200 invoked by uid 500); 4 Oct 2016 16:59:14 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flink.apache.org Delivered-To: mailing list user@flink.apache.org Received: (qmail 43185 invoked by uid 99); 4 Oct 2016 16:59:14 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2016 16:59:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 86E00C1C6D for ; Tue, 4 Oct 2016 16:59:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 5.486 X-Spam-Level: ***** X-Spam-Status: No, score=5.486 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, HTML_MESSAGE=2, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972, URI_HEX=1.313] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id J2FBZvsGmytQ for ; Tue, 4 Oct 2016 16:59:12 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTP id 3B2ED5FB16 for ; Tue, 4 Oct 2016 16:59:12 +0000 (UTC) Received: from mjoe.nabble.com (unknown [162.253.133.57]) by mwork.nabble.com (Postfix) with ESMTP id 98D1C536A6049 for ; Tue, 4 Oct 2016 09:59:10 -0700 (MST) Date: Tue, 4 Oct 2016 09:52:59 -0700 (PDT) From: vinay patil To: user@flink.apache.org Message-ID: In-Reply-To: References: <476155053.4379932.1475507131317@mail.yahoo.com> <1445783729.4442656.1475508486819@mail.yahoo.com> <562747B3-C8A4-44A8-AE27-391E36CF2E4C@data-artisans.com> <2979A1E0-25B8-4175-A0B0-0A144F3E935F@data-artisans.com> <7C36A81D-8448-43D0-9FA9-15BBE4A6EB88@data-artisans.com> Subject: Re: Regarding Late Elements MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_51358_109636450.1475599979003" archived-at: Tue, 04 Oct 2016 16:59:22 -0000 ------=_Part_51358_109636450.1475599979003 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Yes Kostas, thank you for the explanation , I will take a look Regards, Vinay Patil On Tue, Oct 4, 2016 at 11:23 AM, Kostas Kloudas [via Apache Flink User Mailing List archive.] wrote: > Hi Vinay, > > These methods are useful when using your trigger with SessionWindows. When > using session windows, > the state of a window and that of the corresponding trigger has to be > merged with that of other windows. > > These methods do exactly that: the canMerge() says if the trigger can be > used with Session Windows, and if yes, > the onMerge() includes the logic of what to do with the trigger state when > a window merging happens. > > As an example you can check out the CountTrigger. > > I hope this answers your question. > > Cheers, > Kostas > > On Oct 4, 2016, at 6:10 PM, vinay patil <[hidden email] > > wrote: > > Hi Kostas, > > Yes you are right , I am always doing FIRE_AND_PURGE , if we don't do > this and only use FIRE , the window function will get the elements > in incremental fashion (1, 2,3..so on) > I had observed this while testing. > > Can you please explain me the importance of canMerge and onMerge functions > in trigger, from the javadocs I got it on a high level, but not able to > understand it correctly (so I am not using these functions for now in > Custom Trigger). > > Regards, > Vinay Patil > > On Tue, Oct 4, 2016 at 10:51 AM, Kostas Kloudas [via Apache Flink User > Mailing List archive.] < rel="nofollow" link="external" class="">[hidden email]> wrote: > >> Hi Vinay, >> >> By setting the allowed_lateness to LongMax you are ok. >> Sorry I forgot that this was the default value. >> >> Just a note (although you have it right in your code), in this case >> you should always FIRE_AND_PURGE and not just FIRE. In other >> case your state will keep growing as it is never garbage collected. >> >> Cheers, >> Kostas >> >> >> On Oct 4, 2016, at 5:42 PM, vinay patil <[hidden email] >> > wrote: >> >> Long.MAX_VALUE >> >> >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the discussion >> below: >> http://apache-flink-user-mailing-list-archive.2336050.n4. >> nabble.com/Regarding-Late-Elements-tp9284p9329.html >> To start a new topic under Apache Flink User Mailing List archive., email >> > target="_top" rel="nofollow" link="external" class="">[hidden email] >> To unsubscribe from Apache Flink User Mailing List archive., click here. >> NAML >> >> > > > ------------------------------ > View this message in context: Re: Regarding Late Elements > > Sent from the Apache Flink User Mailing List archive. mailing list archive > at > Nabble.com . > > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://apache-flink-user-mailing-list-archive.2336050. > n4.nabble.com/Regarding-Late-Elements-tp9284p9332.html > To start a new topic under Apache Flink User Mailing List archive., email > ml-node+s2336050n1h83@n4.nabble.com > To unsubscribe from Apache Flink User Mailing List archive., click here > > . > NAML > > -- View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Regarding-Late-Elements-tp9284p9335.html Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com. ------=_Part_51358_109636450.1475599979003 Content-Type: text/html; charset=UTF8 Content-Transfer-Encoding: quoted-printable
Yes Kostas, thank you for the explanation , I will take a = look

Regards,
Vinay Patil

On Tue, Oct 4, 2016 at 11:23 AM, Kostas Klou= das [via Apache Flink User Mailing List archive.] <[hidden email]> wrote:
=
=09Hi Vinay,

These methods are useful when using your tr= igger with SessionWindows. When using session windows,=C2=A0
the = state of a window and that of the corresponding trigger has to be merged wi= th that of other windows.=C2=A0

These methods do e= xactly that: the canMerge() says if the trigger can be used with Session Wi= ndows, and if yes,
the onMerge() includes the logic of what to do= with the trigger state when a window merging happens.

=
As an example you can check out the CountTrigger.

=
I hope this answers your question.

Cheers,
Kostas

On Oct 4, 2016, at 6:10 PM, vinay p= atil <[hidden ema= il]> wrote:

Hi Kostas,

= Yes you are right , I am always doing=C2=A0=C2=A0FIRE_AND_PURGE , if we don't do this and only use FIRE , the win= dow function will get the elements in=C2=A0incremental=C2=A0fashion (1, 2,3= ..so on)
I had observed this while testing.

Can you please explai= n me the importance of canMerge and onMerge functions in trigger, from the = javadocs I got it on a high level, but not able to understand it correctly = (so I am not using these functions for now in Custom Trigger).
=

Regards,
Vinay Pat= il

On Tue, Oct 4, 2016 at 10:5= 1 AM, Kostas Kloudas [via Apache Flink User Mailing List archive.] <<a href=3D"x-msg://14/user/SendEmail.jtp?type=3D= node&amp;node=3D9331&amp;i=3D0" target=3D"_top"= rel=3D"nofollow" link=3D"external" class=3D""= ;>[hidden email]> wrote:
=09Hi Vinay,

By setting the allowed_lateness to LongMax = you are ok.=C2=A0
Sorry I forgot that this was the default value.= =C2=A0

Just a note (although you have it right in = your code), in this case=C2=A0
you should always FIRE_AND_PURGE a= nd not just FIRE. In other=C2=A0
case your state will keep growin= g as it is never garbage collected.

Cheers,
<= div>Kostas


On Oct 4, 2016, at 5:42 PM, = vinay patil <[hi= dden email]> wrote:

Long.MAX_VALUE

=09 =09 =09 =09
=09
=09
=09
=09=09
If you reply to this email, your mess= age will be added to the discussion below:
=09=09
http://apache-flink-user-mailing-= list-archive.2336050.n4.nabble.com/Regarding-Late-Elements-tp9284= p9329.html =09
=09
=09=09To start a new topic under Apache Flink User Mailing List archive., e= mail <a href=3D"x-msg://14/user/SendEmail.jtp?type=3Dnode&= amp;node=3D9331&amp;i=3D1" target=3D"_top" rel=3D&q= uot;nofollow" link=3D"external" class=3D"">[hid= den email]
=09=09To unsubscribe from Apache Flink User Mailing List archive., click here.
=09=09NAML<= /a> =09

=09 =09 =09

View this message in context:
Re: Regarding Late El= ements
Sent from the Ap= ache Flink User Mailing List archive. mailing list archive at Nabble.com.

=09 =09 =09 =09
=09
=09
=09
=09=09
If you reply to this email, your mess= age will be added to the discussion below:
=09=09
http://apache-flink-user-mailing-= list-archive.2336050.n4.nabble.com/Regarding-Late-Elements-tp9284= p9332.html =09
=09
=09=09To start a new topic under Apache Flink User Mailing List archive., e= mail [hidden email]
=09=09To unsubscribe from Apache Flink User Mailing List archive., click here.<= br> =09=09NAML<= /a> =09

=09 =09 =09

View this message in context:
Re: Regarding Late Elements
Sent from the Apache Flink User Mailing List archive. mailing list ar= chive at Nabble.com.
------=_Part_51358_109636450.1475599979003--