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 D5056200D15 for ; Thu, 5 Oct 2017 14:20:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D349F1609E1; Thu, 5 Oct 2017 12:20:51 +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 F09CC1609DA for ; Thu, 5 Oct 2017 14:20:50 +0200 (CEST) Received: (qmail 43541 invoked by uid 500); 5 Oct 2017 12:20:49 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@flink.apache.org Received: (qmail 43531 invoked by uid 99); 5 Oct 2017 12:20:49 -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, 05 Oct 2017 12:20:49 +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 B6C1B1A2F74 for ; Thu, 5 Oct 2017 12:20:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.401 X-Spam-Level: X-Spam-Status: No, score=-0.401 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, 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 mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id f55fkLOK_BA5 for ; Thu, 5 Oct 2017 12:20:46 +0000 (UTC) Received: from mail-ua0-f172.google.com (mail-ua0-f172.google.com [209.85.217.172]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id B16AD5FBEE for ; Thu, 5 Oct 2017 12:20:46 +0000 (UTC) Received: by mail-ua0-f172.google.com with SMTP id z4so832233uaz.5 for ; Thu, 05 Oct 2017 05:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ngVvQMT7BGO0zgjhDRUoRBtiRGmQ2wDQhXB4uWAJMXA=; b=sFkbmWan3CgonucTb91E9cC8yaubxG8+bnMpIjAM2GNzSkA9DN/IYbjddi/zAsBhDu p7aJMsxmmta/iIGyhVy7KYBO9Ou+WxVHJ/prjG8w4VnqTzaoW50fFmUgHHwaSvb+Wv5b mZQ/RbDVrlZfMP04zuskOu1UyLZ/B74CBBecrqO245Bd7MT/za5JjMIAZVHaiFbMIHDe A93bHG183pmqnlvZOb5MsB4LWChzRVtAtP9BPH3V7nDcklanqTjivM2GB9M7RhGvjie2 EnjuLckEmNGstiiAFaKiwSr1OQ38D+Dse4jBejU2myvgeuKNxl8X6xT/jHjFcp1ax4t7 QeLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ngVvQMT7BGO0zgjhDRUoRBtiRGmQ2wDQhXB4uWAJMXA=; b=jj4qJ0Jj/6A0spfLsmSBjx249EV/MIsje2KtKfezdWhLzFXKLgvGWaUu968UcLkpeM jiG+3EUkI2JQ+6qrAh094AsizEHUPsAOjTdI4cGsoYS3znmp+16rY4qJtzNxS1PNdOKk c6S6Vzm4JIHOO9eNTx23up2lSJUhJQvGSU8u539Cl9pikpxjYI8obthUowLV/RSgTxm/ PKAWIhBQdepR8QIjyMSaVsYUFicMsA3rPsnJvk3DqfV2rO7ktQ/9U2aD5SrStdSxU3rA TUcc/8TPfARzncrI5Qagc6ZpTTtdLxJfe1J3fTaKsNtRiBZd7JglnYyG7/LHmSgxGD/b qU7g== X-Gm-Message-State: AMCzsaUGBlOHGAQZ68ZyAFbxAhvh49C1AqTabw0bawNUJkjWy7AvSSAZ zhfdOnb5ruHRVoekl50p0bM2tIpEacwq2BYsaBc= X-Google-Smtp-Source: AOwi7QAIy1kdu7QdcerZpxa5vP8FVemPDAmaXPk5sUVF+j7vObGhev1dIpd45hFyOu1XEnMaivUdYBMLfgntzYHU3DE= X-Received: by 10.176.1.134 with SMTP id 6mr9915743ual.105.1507206046306; Thu, 05 Oct 2017 05:20:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.12.69 with HTTP; Thu, 5 Oct 2017 05:20:05 -0700 (PDT) In-Reply-To: References: From: Fabian Hueske Date: Thu, 5 Oct 2017 14:20:05 +0200 Message-ID: Subject: Re: Calculating metrics real time To: Rahul Raj Cc: user Content-Type: multipart/alternative; boundary="001a113bcdc2fe57e0055acbc0b4" archived-at: Thu, 05 Oct 2017 12:20:52 -0000 --001a113bcdc2fe57e0055acbc0b4 Content-Type: text/plain; charset="UTF-8" Hi, I'd suggest to have a look at the window operators [1]. For example a tumbling window of 1 minute can be used to compute metrics every minute. Flink's window operators are very extensible and you can implement very custom logic if the predefined windows don't match your use case. In any case, windows are used to collect and perform a computation on a set of records. Best, Fabian [1] https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/windows.html 2017-10-05 12:57 GMT+02:00 Rahul Raj : > Hi, > > I have to calculate some complicated metrics like click through rate , > click value rate and conversions on real time data using flink. But I am > not sure what functionality of flink should I use to program this because > it involves collection of some records in memory for certain time may be 1 > minute and then using formula for calculating metrics on those records. > > Am I correct with my approach or is there any preferred approach for such > tasks in flink? Can I use windows for doing this? Any tutorial or example > would be really great. > > Rahul Raj > --001a113bcdc2fe57e0055acbc0b4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I'd suggest to have a = look at the window operators [1]. For example a tumbling window of 1 minute= can be used to compute metrics every minute.
Flink's window o= perators are very extensible and you can implement very custom logic if the= predefined windows don't match your use case. In any case, windows are= used to collect and perform a computation on a set of records.

Best, Fabian

2017-10-05 12:57 GMT+02:00= Rahul Raj <rahulrajmsrit@gmail.com>:
Hi,

I have to calcula= te some complicated metrics like click through rate , click value rate and = conversions on real time data using flink. But I am not sure what functiona= lity of flink should I use to program this because it involves collection o= f some records in memory for certain time may be 1 minute and then using fo= rmula for calculating metrics on those records.=C2=A0

<= div>Am I correct with my approach or is there any preferred approach for su= ch tasks in flink? Can I use windows for doing this? Any tutorial or exampl= e would be really great.

Rahul Raj

--001a113bcdc2fe57e0055acbc0b4--