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 7CB6A198C6 for ; Thu, 21 Apr 2016 19:30:59 +0000 (UTC) Received: (qmail 99122 invoked by uid 500); 21 Apr 2016 19:30:59 -0000 Delivered-To: apmail-flink-user-archive@flink.apache.org Received: (qmail 99028 invoked by uid 500); 21 Apr 2016 19:30:59 -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 99018 invoked by uid 99); 21 Apr 2016 19:30:58 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Apr 2016 19:30:58 +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 8B5C11A03DF for ; Thu, 21 Apr 2016 19:30:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id zJwqq5y1K7eL for ; Thu, 21 Apr 2016 19:30:55 +0000 (UTC) Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 753775F23D for ; Thu, 21 Apr 2016 19:30:55 +0000 (UTC) Received: by mail-wm0-f49.google.com with SMTP id e201so98361955wme.0 for ; Thu, 21 Apr 2016 12:30:55 -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=OF8OHnqNeA7tAlDTlIGjIE/k1Tknk3nNsbUpbXm5yOE=; b=aODxG8EmgZwD+HQggurHZmm7vLJp6zuGho2+T2jitAwQHbrapeMqNNaq+oMQr7nQ90 NBXpfQpCluvPRhtONF6hL5drvK9EiJyLu5zZpozr4NbRqATF75pmc7WRzZBqlcpX0eQl wL1rpkXZAz4xb8JoxLWuES9RUh7z3oM14k8HiChMB3dFASCTWxE5X0xtbnG0hyv2Uzrf DsxFEbAZ3sg4GdQsiQBxTAFfM1RRVw1jDqy2pxQy4dIkdcv9SYkFsCj6/rFDKPx0g4y6 bf2MXMJfy5JKVTKl8tDzVr5/BLNnhO/xb3bOfVZcbkHz4w78z1gfXLk486yj8mwXohVO vJJA== 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=OF8OHnqNeA7tAlDTlIGjIE/k1Tknk3nNsbUpbXm5yOE=; b=iUS8ub3EgmSz0DGH4s8xJ66xeswuNR6Da1lXRkIU+7I9TZWpZn5CQO4cZypMdFMa8r jVyIV9ezsFE1vdNHA2ZnE8pYIodST857e+VlbRjH3LDPTMmFc+8KrLgD1YZJg0F6B9Hr bfS98wKidrtSkwVQ5j1KdGTo7dszbabp6DrYWp7CSdQ3KepDsqQLyputC5r1fOYCLRvp iqlKT1L+QhJQXwg0RLU1FMzVdzy+PgdaFZOFDb+SguepmbNpeJ25OnZyp4V2g+exjQ/t vknFaQXVLH2ycZXAfVkV5cLkthLXD6/az/qx94yHkaFUBIvdoH+nRgbx66sQudTP1wf1 nYdA== X-Gm-Message-State: AOPr4FXpWyiztHR5XmaNr0CyWYOiIOn97LnIBeJDXbAbUVgLIi3/KzQZpJRufLXr+aRcKb4W3eY1fKTbeiEp3w== X-Received: by 10.194.138.37 with SMTP id qn5mr16301060wjb.108.1461267055194; Thu, 21 Apr 2016 12:30:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.47.132 with HTTP; Thu, 21 Apr 2016 12:30:25 -0700 (PDT) In-Reply-To: References: From: Fabian Hueske Date: Thu, 21 Apr 2016 21:30:25 +0200 Message-ID: Subject: Re: implementing a continuous time window To: user@flink.apache.org Content-Type: multipart/alternative; boundary=bcaec50fe6ddbf38a0053103bf2b --bcaec50fe6ddbf38a0053103bf2b Content-Type: text/plain; charset=UTF-8 Yes, sliding windows are different. You want to evaluate the window whenever a new element arrives or an element leaves because 5 secs passed since it entered the window, right? I think that should be possible with a GlobalWindow, a custom Trigger which holds state about the time when each element in the window entered the window, and an Evictor. 2016-04-21 21:19 GMT+02:00 Jonathan Yom-Tov : > I think sliding windows are different. In the example in the blog post a > window is computed every 30 seconds (so at fixed time intervals). What I > want is for a window to be computed every time an event comes in and then > once again when the event leaves the window. > > On Thu, Apr 21, 2016 at 10:14 PM, John Sherwood wrote: > >> You are looking for sliding windows: >> https://flink.apache.org/news/2015/12/04/Introducing-windows.html >> >> Here you would do >> >> .timeWindow(Time.seconds(5), Time.seconds(1)) >> >> On Thu, Apr 21, 2016 at 12:06 PM, Jonathan Yom-Tov >> wrote: >> >>> hi, >>> >>> Is it possible to implement a continuous time window with flink? Here's >>> an >>> example. Say I want to count events within a window. The window length >>> is 5 >>> seconds and I get events at t = 1, 2, 7, 8 seconds. I would then expect >>> to >>> get events with a count at t = 1 (count = 1), t = 2 (count = 2), t = 6 >>> (count = 1), t = 7 (count = 2), t = 8 (count = 2), t = 12 (count = 1) >>> and t >>> = 13 (count = 0). >>> >>> How would I go about doing that?. >>> >>> thanks, >>> Jon. >>> >> >> > --bcaec50fe6ddbf38a0053103bf2b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yes, sliding windows are different.
You= want to evaluate the window whenever a new element arrives or an element l= eaves because 5 secs passed since it entered the window, right?
I think that should be possible with a GlobalWindow, a custom Trigger whi= ch holds state about the time when each element in the window entered the w= indow, and an Evictor.

2016-04-21 21:19 GMT+02:00 Jonathan Yom-Tov <jon.yomto= v@gmail.com>:
I think sliding windows are different. In the example in the blog post = a window is computed every 30 seconds (so at fixed time intervals). What I = want is for a window to be computed every time an event comes in and then o= nce again when the event leaves the window.

On = Thu, Apr 21, 2016 at 10:14 PM, John Sherwood <jrs@vt.edu> wrote:
You are looking for slidi= ng windows:=C2=A0https://flink.apache.org/news/2015/12= /04/Introducing-windows.html

Here you would do

.timeWindo= w(Time.seconds(5), Time.seconds(1))

On Thu, Apr 21, 2016 at 12:06 PM, Jonatha= n Yom-Tov <jon.yomtov@gmail.com> wrote:
hi,

Is it possible to implement a continuous time window= with flink? Here's an
example. Say I = want to count events within a window. The window length is 5
seconds and I get events at t =3D 1, 2, 7, 8 seconds. I = would then expect to
get events with a cou= nt at t =3D 1 (count =3D 1), t =3D 2 (count =3D 2), t =3D 6
(count =3D 1), t =3D 7 (count =3D 2), t =3D 8 (count =3D = 2), t =3D 12 (count =3D 1) and t
=3D 13 (c= ount =3D 0).

How would I go about doing that?.

thanks,
Jon.



--bcaec50fe6ddbf38a0053103bf2b--