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 E245A187B8 for ; Mon, 30 Nov 2015 09:55:05 +0000 (UTC) Received: (qmail 87186 invoked by uid 500); 30 Nov 2015 09:55:00 -0000 Delivered-To: apmail-flink-user-archive@flink.apache.org Received: (qmail 87094 invoked by uid 500); 30 Nov 2015 09:55:00 -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 87079 invoked by uid 99); 30 Nov 2015 09:55:00 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Nov 2015 09:55:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 3E61AC059B for ; Mon, 30 Nov 2015 09:55:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.999 X-Spam-Level: ** X-Spam-Status: No, score=2.999 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-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 (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id ghO6yn7oI5qx for ; Mon, 30 Nov 2015 09:54:59 +0000 (UTC) Received: from mail-qg0-f42.google.com (mail-qg0-f42.google.com [209.85.192.42]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id EBF4221053 for ; Mon, 30 Nov 2015 09:54:58 +0000 (UTC) Received: by qgec40 with SMTP id c40so113164978qge.2 for ; Mon, 30 Nov 2015 01:54:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=g992D37P+mEGWs8SATHRbUjoZB/ukQt23xTTvxeO1pw=; b=O/whQHpEhkpnlaAjw4pFnEeN9Z1X0WQjje1Z3Npj6qI1HCw9s5B3/nh37mISbrAVf4 H898tCxJuxkypcSubZljE2sjrlKY9QUqAkhZddXvw4dkxYt4jkWITG2STbydy0qC9HYL QMC+H0rysjBWrTrbODBsSU93OucAFqEdph5KPa76h0HBaHoymu4uF9cGYwIns/Z47O5Q g7Ww2b7MVWKZTPm1g7H20vGxjM3pEGlLedCCDKfnofrBol9j9cLxKhhftnyMGN3q3ys5 A067PMXeK7Tt0LGv7mK4JgaGcowQnT+pSsB0U0VoynJ/vbbyN2ciphEjooEJLl0j/REW fCPw== MIME-Version: 1.0 X-Received: by 10.140.34.133 with SMTP id l5mr66258008qgl.29.1448877291821; Mon, 30 Nov 2015 01:54:51 -0800 (PST) Sender: ewenstephan@gmail.com Received: by 10.55.147.1 with HTTP; Mon, 30 Nov 2015 01:54:51 -0800 (PST) In-Reply-To: <049BC923-A755-445F-A22D-37162D6FE80D@apache.org> References: <5658D37E.7020905@gmail.com> <049BC923-A755-445F-A22D-37162D6FE80D@apache.org> Date: Mon, 30 Nov 2015 10:54:51 +0100 X-Google-Sender-Auth: fE15x0_QacKAjLZ4dE0ZZfoE2ug Message-ID: Subject: Re: Get an aggregator's value outside of an iteration From: Stephan Ewen To: user@flink.apache.org Content-Type: multipart/alternative; boundary=001a11c0f5284d5e310525bf0886 --001a11c0f5284d5e310525bf0886 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable We wanted to combine the accumulators and aggregators for a while, but have not gotten to it so far (there is a pending PR which needs some more work). You can currently work your way around this by using the accumulators together with the aggregators. - Aggregators: Within an iteration across supersteps - Accumulators: Across one job, retrievable at the end in the client You can use the close() method of a function (close() is called after each superstep) to take the aggregator value and put it into an accumulator. That accumulator can be retrieved after the job has finished. Hope that workaround works for you! Stephan On Mon, Nov 30, 2015 at 10:51 AM, Aljoscha Krettek wrote: > Hi, > I=E2=80=99m afraid there is no way right now to get at the values of aggr= egators. > I think implementing this is problematic since the aggregators from the > different parallel instances of operators are only combined on the > JobManager (master node). > > Cheers, > Aljoscha > > On 27 Nov 2015, at 23:04, Truong Duc Kien > wrote: > > > > Hi, > > > > I'm looking for a way get the value of aggregators outside of iteration= . > Specifically, I want the final aggregators' value after the iteration has > finished. Is there any API for that ? > > > > Thanks, > > Kien Truong > > --001a11c0f5284d5e310525bf0886 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
We wanted to combine the accumulators and aggregators= for a while, but have not gotten to it so far (there is a pending PR which= needs some more work).

You can currently work your way= around this by using the accumulators together with the aggregators.
= =C2=A0 - Aggregators: Within an iteration across supersteps
=C2= =A0 - Accumulators: Across one job, retrievable at the end in the client

You can use the close() method of a function (close(= ) is called after each superstep) to take the aggregator value and put it i= nto an accumulator. That accumulator can be retrieved after the job has fin= ished.

Hope that workaround works for you!

Stephan


On Mon, Nov 30, 2015 at 10:51 AM, Aljosc= ha Krettek <aljoscha@apache.org> wrote:
Hi,
I=E2=80=99m afraid there is no way right now to get at the values of aggreg= ators. I think implementing this is problematic since the aggregators from = the different parallel instances of operators are only combined on the JobM= anager (master node).

Cheers,
Aljoscha
> On 27 Nov 2015, at 23:04, Truo= ng Duc Kien <duckientruong@gm= ail.com> wrote:
>
> Hi,
>
> I'm looking for a way get the value of aggregators outside of iter= ation. Specifically, I want the final aggregators' value after the iter= ation has finished. Is there any API for that ?
>
> Thanks,
> Kien Truong


--001a11c0f5284d5e310525bf0886--