Return-Path: X-Original-To: apmail-flink-user-archive@minotaur.apache.org Delivered-To: apmail-flink-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 11BDE18CC0 for ; Sat, 28 Nov 2015 02:14:42 +0000 (UTC) Received: (qmail 16650 invoked by uid 500); 28 Nov 2015 02:14:41 -0000 Delivered-To: apmail-flink-user-archive@flink.apache.org Received: (qmail 16557 invoked by uid 500); 28 Nov 2015 02:14:41 -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 16547 invoked by uid 99); 28 Nov 2015 02:14:41 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Nov 2015 02:14:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 387371A230C for ; Sat, 28 Nov 2015 02:14:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.899 X-Spam-Level: ** X-Spam-Status: No, score=2.899 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 4lG9OKaqCeiM for ; Sat, 28 Nov 2015 02:14:35 +0000 (UTC) Received: from mail-io0-f180.google.com (mail-io0-f180.google.com [209.85.223.180]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id B764B2026C for ; Sat, 28 Nov 2015 02:14:34 +0000 (UTC) Received: by iouu10 with SMTP id u10so129318228iou.0 for ; Fri, 27 Nov 2015 18:14:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=nu40/HE8kmWZWXc15lvQJEeI8cOu05e9GSXcv8Tgqro=; b=Z24ROI5t2xi5ey5AU2nbxgZo7LQ0LfVKISOLE9BrIHzp9+VnnG8dGA8i55LeToUeA3 t6U3D157NFNl9Tpofx6TA/ubJLSAuIPpSF27ytcXJosvm+3TM+k9eMh/G8c9dPU6l7WI Kcwh7Vlw5ZR/rNgcWOE097hGDQAXdiyUw0gZkPA0YVFgl3ty+qV0Sn5uGyTJ8kp8S0mM 90GQit9iJQo63F5/oqV81/wbNEVJkEL8642jnPHn1+CNDoqzveIU7R8dDncxun1Cpjv4 LKqoixt9mQOS4PPZ3bLqN3X9DRYPKjQ99MbB4ecNRkwS4wdTPOeZgSZuPq0vqYixTN8n XhgA== MIME-Version: 1.0 X-Received: by 10.107.168.77 with SMTP id r74mr48838353ioe.126.1448676874165; Fri, 27 Nov 2015 18:14:34 -0800 (PST) Received: by 10.79.116.216 with HTTP; Fri, 27 Nov 2015 18:14:34 -0800 (PST) Date: Sat, 28 Nov 2015 07:44:34 +0530 Message-ID: Subject: Re: Interpretation of Trigger and Eviction on a window From: Nirmalya Sengupta To: user@flink.apache.org Content-Type: multipart/alternative; boundary=001a114265ba7aa24c0525905e4d --001a114265ba7aa24c0525905e4d Content-Type: text/plain; charset=UTF-8 Hello Fabian, >From your reply to this thread: ' it is correct that the evictor is called BEFORE the window function is applied because this is required to support certain types of sliding windows. ' This is clear to me now. However, my point was about the way it is described in the User-guide. The guide says this: ' *After the trigger fires, and before the function (e.g., sum, count) is applied to the window contents, an optional Evictor removes some elements from the beginning of the window before the remaining elements are passed on to the function* ' As I read it again, I see where the problem lies. It says some elements are removed before the **rest** are passed to the function. This is not what happens, I think. Evictor removes elements and the function *sees this set of removed elements, not the remaining elements*. Remaining elements remain in the window and are perhaps picked up by the Evictor next time. Carrying on from your elaboration, I think guide's statement can be better rearranged as: ' *After the trigger fires, the function (e.g., sum, count) is applied to the entire contents of the window. However, an optionally provided Evictor, removes some elements from the beginning of the window, according to the criteria of eviction. The function is then applied to this set of __removed__ elements. '* Let me know if I am way off the mark here. -- Nirmalya -- Software Technologist http://www.linkedin.com/in/nirmalyasengupta "If you have built castles in the air, your work need not be lost. That is where they should be. Now put the foundation under them." --001a114265ba7aa24c0525905e4d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello Fabian,
From your reply to this thread:=C2=A0
'=C2=A0it is correct that the evi= ctor is called BEFORE the window function is applied because this is requir= ed to support certain types of sliding windows.=C2=A0'
This is clear to me now. However, my point was about th= e way it is described in the User-guide. The guide says this:
<= div>'=C2=A0After the trigger fires, and before the= function (e.g.,=C2=A0sum,=C2= =A0count) is applied to the w= indow contents, an optional=C2=A0Evictor=C2=A0removes some elements from the beginning of the window bef= ore the remaining elements are passed on to the function= =C2=A0'

As I read it again, I see w= here the problem lies. It says some elements are removed before the **rest*= * are passed to the function. This is not what happens, I think. Evictor re= moves elements and the function sees this set of removed elements, not t= he remaining elements. Remaining elements remain in the window and are = perhaps picked up by the Evictor next time.

Carrying on from your elaboration, I think guide's statement can b= e better rearranged as:
'=C2=A0<= font color=3D"#3d85c6">After the trigger f= ires, the function (e.g.,=C2=A0sum,=C2=A0count) is applied= to the entire contents of the window. However, an optionally provided=C2= =A0Evictor,=C2=A0removes some= elements from the beginning of the window, according to the criteria of ev= iction. The function is then applied to this set of __removed__ elements. '
=C2=A0
Let me know if I am way = off the mark here.
-- Nirmalya

--
Software Technologist
http://www.linkedin.= com/in/nirmalyasengupta
"If you have built castles in the air, = your work need not be lost. That is where they should be.
Now put the fo= undation under them."
--001a114265ba7aa24c0525905e4d--