From user-return-17914-archive-asf-public=cust-asf.ponee.io@flink.apache.org Wed Jan 31 14:27:31 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id D4CFE180662 for ; Wed, 31 Jan 2018 14:27:31 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C47B8160C35; Wed, 31 Jan 2018 13:27:31 +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 198BC160C25 for ; Wed, 31 Jan 2018 14:27:30 +0100 (CET) Received: (qmail 94341 invoked by uid 500); 31 Jan 2018 13:27:29 -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 94331 invoked by uid 99); 31 Jan 2018 13:27:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Jan 2018 13:27:29 +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 64677C036A for ; Wed, 31 Jan 2018 13:27:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.485 X-Spam-Level: *** X-Spam-Status: No, score=3.485 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, NML_ADSP_CUSTOM_MED=1.2, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.972, URI_HEX=1.313] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id nW4ga-t6XQYa for ; Wed, 31 Jan 2018 13:27:27 +0000 (UTC) Received: from n4.nabble.com (n4.nabble.com [162.253.133.72]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 6E6285F296 for ; Wed, 31 Jan 2018 13:27:27 +0000 (UTC) Received: from mben.nabble.com (localhost [127.0.0.1]) by n4.nabble.com (Postfix) with ESMTP id 32D1A18455986 for ; Wed, 31 Jan 2018 06:27:27 -0700 (MST) Date: Wed, 31 Jan 2018 06:27:27 -0700 (MST) From: "m@xi" To: user@flink.apache.org Message-ID: <1517405247205-0.post@n4.nabble.com> In-Reply-To: <1512802865634-0.post@n4.nabble.com> References: <1512018087541-0.post@n4.nabble.com> <1512463943984-0.post@n4.nabble.com> <2F35B727-D4C6-447F-80D3-22E2370961DE@data-artisans.com> <1512802865634-0.post@n4.nabble.com> Subject: Re: Maintain heavy hitters in Flink application MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello everyone and Happy New Year! Regarding the Heavy Hitter tracking...I wanna do it in a distributed manner. Thus, 1 -- Round Robin the input stream to a number of parallel map instances (say p = env.parallelism) 2 -- Each one of the p mappers maintains approximately the HH of its corresponding portion of the input, utilizing an algorithm like Space Saving, Misha-Gries etc etc. 3 -- Every now and then I would like to concatenate the state of all the p mappers into one, thus producing the global Space Saving summary for the entire input stream. 4 -- Due to the fact that I wanna balance out things given to the p mappers in the beginning, I wanna use rebalance(), i.e. round robin algorithm --> Thus, its is not possible to use Keyed State. 5 -- So, I am going to use ListCheckpointed state as described in [1]. 6 -- When the "every now and then" happens, I wanna merge the partial summaries and I will emit them through a side output, as described in [2]. The question is the following: [1] shows an example of state-redistribution. So...can I change the parallelism of the p instance parallel .map() from within the operator, and merge the summaries for the HH there just before emitting them to the side output??? Essentially, how should I implement the 6th bullet is my question. Any advice, on it or on the general guideline implementation for getting the aforementioned thing done, is more than welcome. Cheer, Max [1] https://ci.apache.org/projects/flink/flink-docs-release-1.4/api/java/ [2] https://ci.apache.org/projects/flink/flink-docs-release-1.4/dev/stream/side_output.html -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/