Return-Path: X-Original-To: apmail-flink-dev-archive@www.apache.org Delivered-To: apmail-flink-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9D86317DBE for ; Sat, 28 Feb 2015 06:58:14 +0000 (UTC) Received: (qmail 21234 invoked by uid 500); 28 Feb 2015 06:58:09 -0000 Delivered-To: apmail-flink-dev-archive@flink.apache.org Received: (qmail 21174 invoked by uid 500); 28 Feb 2015 06:58:09 -0000 Mailing-List: contact dev-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list dev@flink.apache.org Received: (qmail 21161 invoked by uid 99); 28 Feb 2015 06:58:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Feb 2015 06:58:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ted.dunning@gmail.com designates 209.85.223.176 as permitted sender) Received: from [209.85.223.176] (HELO mail-ie0-f176.google.com) (209.85.223.176) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Feb 2015 06:58:03 +0000 Received: by iecrl12 with SMTP id rl12so36414031iec.4 for ; Fri, 27 Feb 2015 22:57:43 -0800 (PST) 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 :content-type; bh=SYV3bRjAy0tw9CH8w+84HIIlBSsTY6qCyRsDbu/vyF8=; b=THfsEib59V4lk31kKc7AhHUJ58eY6d2Yynebs2H1tcmoLs1zPUpQpqtBqdiWBFfhYj ErsmT/ezHOtVCf9WJfQphsaMl2wFucMSjzixSOWqhP6XK2PZZ/rXW11utvLAImi12wrO E1JIlKZcu/Y2HRoYD0WvOj7z+yYR2iNXJilpv1aTcMVbuHjPdiGkSqqBoLT5XR++B3MO Mlasplr1xehoeo7ozsXiNj4DOmfp5vfX6v/gllBq8SVYoNHRz1xuHXmJTsviiCnacRob SS7hE10GPHFdLz45zRUZRFNm0sEWnnSTI251TV9ViYp3NfUgJEQuxIOmHfLAg0e/HleA A+Qg== X-Received: by 10.42.236.138 with SMTP id kk10mr20125180icb.60.1425106663222; Fri, 27 Feb 2015 22:57:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.10.3 with HTTP; Fri, 27 Feb 2015 22:57:13 -0800 (PST) In-Reply-To: References: From: Ted Dunning Date: Sat, 28 Feb 2015 07:57:13 +0100 Message-ID: Subject: Re: Thoughts About Object Reuse and Collection Execution To: "dev@flink.apache.org" Content-Type: multipart/alternative; boundary=20cf302920ea6dd274051020803c X-Virus-Checked: Checked by ClamAV on apache.org --20cf302920ea6dd274051020803c Content-Type: text/plain; charset=UTF-8 This is going to have profound performance implications if this is the only path for iteration. On Fri, Feb 27, 2015 at 10:58 PM, Stephan Ewen wrote: > I vote to have the key extractor return a new value each time. That means > that objects are not reused everywhere where it is possible, but still in > most places, which still helps. > > What still puzzles me: I thought that the collection execution stores > copies of the returned records by default (reuse safe mode). > Am 27.02.2015 15:36 schrieb "Aljoscha Krettek" : > > > Hello Nation of Flink, > > while figuring out this bug: > > https://issues.apache.org/jira/browse/FLINK-1569 > > I came upon some difficulties. The problem is that the > > KeyExtractorMappers always > > return the same tuple. This is problematic, since Collection Execution > > does simply store the returned values in a list. These elements are > > not copied before they are stored when object reuse is enabled. > > Therefore, the whole list will contain only that one reused element. > > > > I see two options for solving this: > > 1. Change KeyExtractorMappers to always return a new tuple, thereby > > making object-reuse mode in cluster execution useless for key > > extractors. > > > > 2. Change collection execution mapper to always make copies of the > > returned elements. This would make object-reuse in collection > > execution pretty much obsolete, IMHO. > > > > How should we proceed with this? > > > > Cheers, > > Aljoscha > > > --20cf302920ea6dd274051020803c--