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 208D4200B58 for ; Wed, 27 Jul 2016 14:05:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1F3D2160A90; Wed, 27 Jul 2016 12:05:10 +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 47A28160A6E for ; Wed, 27 Jul 2016 14:05:09 +0200 (CEST) Received: (qmail 48627 invoked by uid 500); 27 Jul 2016 12:05:08 -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 48617 invoked by uid 99); 27 Jul 2016 12:05:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jul 2016 12:05:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id D7C66188593 for ; Wed, 27 Jul 2016 12:05:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id YArEsYfFuqSp for ; Wed, 27 Jul 2016 12:05:05 +0000 (UTC) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 42F5260D71 for ; Wed, 27 Jul 2016 12:05:05 +0000 (UTC) Received: by mail-wm0-f54.google.com with SMTP id i5so59031279wmg.0 for ; Wed, 27 Jul 2016 05:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=R2K59m8SSUEn1c8lrfhSHZUkeaCQkz15epKCdBgWhEM=; b=tdQARp9OY3jQtY2imCPnEA1ebzqW3Exmri168+Ff6vfhrdH3liXiAGPGPbIZmshRzI AoumT8YqbbpQ7mNTCcKWMxQf1lNPwewdydrfLrTIjNRPidSSdawH9KK60WtmVyBV7n9I Pcr251ume4AyR17JPT8XLSXsbFaHX8AELL1kBtjVddQ/Wxoxb4HoVqHJ2oW/VEpQoNo9 OTH2td2/pieSk8kKkTe8/8Aqlwl40GG8a+J6CJ4RpWG7a405E5O41FLhbSH43KOZ4KZv 7vGEstKq0Z/7tjRvG2iT1TPhvb6ZEetvYlEoGxVOWFzSggRzhaoG8OMg6EpQlACs7WoO PEhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=R2K59m8SSUEn1c8lrfhSHZUkeaCQkz15epKCdBgWhEM=; b=i3sftk6Lrmm/Hh5kozaie/1bOdhpqSK+M+YWM8C26WmZcSUM1zedtynqnF+LcngYq3 Y9smPzvLKDc+jJcv9mxRVzfhaSPa1WjhCSb/XFR3M+AbjppawHR8Y/WU79Njzp6eyZAl tTHaqukOlHolIXShXrjaP6AyqlMFDoZazES0MLH66QB4QF3JZuAJk4neQ41xIN3bRHuQ uQAiFjtpSS/EVW5FLijK/j4nRExwh/rSXesHQzK6+2uiVhc3tcbZdm2E2Y3HkPBlEkmP t6fqt1sLXKohFB6ATE/6tc3BiJfRGCJfe6o5LPaZCohSEpf0NCMdlT728KNWytrBt99f uLBw== X-Gm-Message-State: AEkoouvsb/oknY4HZ5llBqzBSfOOzqTkWWF2yIDeHgND0tNlA4fCzLTx9ZinLvgtPXcQ062F+uzxPnjBfBN1kg== X-Received: by 10.194.238.170 with SMTP id vl10mr27588462wjc.18.1469621104330; Wed, 27 Jul 2016 05:05:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.210.71 with HTTP; Wed, 27 Jul 2016 05:04:24 -0700 (PDT) In-Reply-To: <371215EB-46E3-4AEC-9A4C-BE2A258129F7@data-artisans.com> References: <371215EB-46E3-4AEC-9A4C-BE2A258129F7@data-artisans.com> From: Yassin Marzouki Date: Wed, 27 Jul 2016 14:04:24 +0200 Message-ID: Subject: Re: If I chain two windows, what event-time would the second window have? To: user@flink.apache.org Content-Type: multipart/alternative; boundary=089e014934ace0d05d05389cd383 archived-at: Wed, 27 Jul 2016 12:05:10 -0000 --089e014934ace0d05d05389cd383 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Kostas, Thank you very much for the explanation. Best, Yassine On Wed, Jul 27, 2016 at 1:09 PM, Kostas Kloudas wrote: > Hi Yassine, > > When the WindowFunction is applied to the content of a window, the > timestamp of the resulting record > is the window.maxTimestamp, which is the endOfWindow-1. > > You can imaging if you have a Tumbling window from 0 to 2000, the result > will have a timestamp of 1999. > Window boundaries are closed in the start and open at the end timestamp, > or [start, end). > > If you want to play around, I would suggest checking out the tests in the > WindowOperatorTest class. > > There you can do experiments and figure out how Flink=E2=80=99s windowOpe= rator > works internally and what is the > interplay between windowAssingers, triggers, and the windowOperator. > > Hope this helps, > Kostas > > On Jul 27, 2016, at 8:41 AM, Yassin Marzouki wrote= : > > Hi all, > > Say I assign timestamps to a stream and then apply a transformation like > this: > > > stream.keyBy(0).timeWindow(Time.hours(5)).reduce(count).timeWindowAll(Tim= e.days(1)).apply(transformation) > > Now, when the first window is applied, events are aggregated based on > their timestamps, but I don't understand what timestamp will be assigned = to > the aggregated result of the reduce operation for the second window to > process it. Could you please explain it? Thank you. > > Best, > Yassine > > > --089e014934ace0d05d05389cd383 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Kostas,
<= font face=3D"verdana, sans-serif">
Thank you very much for the explanation.
<= font face=3D"verdana, sans-serif">
Best,
Y= assine

On Wed, Jul 27, 2016 at 1:09 PM, Kostas Kloudas <k.k= loudas@data-artisans.com> wrote:
Hi Yassine,

Wh= en the WindowFunction is applied to the content of a window, the timestamp = of the resulting record
is the window.maxTimestamp, which is the = endOfWindow-1.

You can imaging if you have a Tumbl= ing window from 0 to 2000, the result will have a timestamp of 1999.
<= div>Window boundaries are closed in the start and open at the end timestamp= , or [start, end).

If you want to play around, I w= ould suggest checking out the tests in the WindowOperatorTest class.
<= div>
There you can do experiments and figure out how Flink=E2= =80=99s windowOperator works internally and what is the=C2=A0
int= erplay between windowAssingers, triggers, and the windowOperator.

Hope this helps,
Kostas

On Jul 27, 2016,= at 8:41 AM, Yassin Marzouki <yassmarzou@gmail.com> wrote:

Hi all,

Say I assign timestamps to a stream and then apply a transformation = like this:

<= /div>
stream.keyBy(0).timeWindo= w(Time.hours(5)).reduce(count).timeWindowAll(Time.days(1)).apply(transforma= tion)

=
Now, when the first window is= applied, events are aggregated based on their timestamps, but I don't = understand what timestamp will be assigned to the aggregated result of the = reduce operation for the second window to process it.=C2=A0Could you please explain it? Thank you.

Best,
Yassine

--089e014934ace0d05d05389cd383--