Return-Path: X-Original-To: apmail-crunch-dev-archive@www.apache.org Delivered-To: apmail-crunch-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 7D08218E2D for ; Fri, 22 May 2015 13:27:18 +0000 (UTC) Received: (qmail 92878 invoked by uid 500); 22 May 2015 13:27:17 -0000 Delivered-To: apmail-crunch-dev-archive@crunch.apache.org Received: (qmail 92823 invoked by uid 500); 22 May 2015 13:27:17 -0000 Mailing-List: contact dev-help@crunch.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@crunch.apache.org Delivered-To: mailing list dev@crunch.apache.org Received: (qmail 92640 invoked by uid 500); 22 May 2015 13:27:17 -0000 Delivered-To: apmail-incubator-crunch-dev@incubator.apache.org Received: (qmail 92616 invoked by uid 99); 22 May 2015 13:27:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 May 2015 13:27:17 +0000 Date: Fri, 22 May 2015 13:27:17 +0000 (UTC) From: "Stephen Patel (JIRA)" To: crunch-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CRUNCH-525) The ExtractKeyFn is has an incorrect scale factor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CRUNCH-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14556136#comment-14556136 ] Stephen Patel commented on CRUNCH-525: -------------------------------------- Yeah I don't see how to get PairMapFn's scale to be correct. I would think it should be something like: ((keyMapFn.scale * keys.size) + (valMapFn.scale * vals.size))/(keys.size+vals.size) but that's not possible. > The ExtractKeyFn is has an incorrect scale factor > ------------------------------------------------- > > Key: CRUNCH-525 > URL: https://issues.apache.org/jira/browse/CRUNCH-525 > Project: Crunch > Issue Type: Bug > Components: Core > Affects Versions: 0.12.0 > Reporter: Stephen Patel > Assignee: Josh Wills > Priority: Minor > Attachments: CRUNCH-525.patch > > > The ExtractKeyFn[0] used by the by[1] method of the PCollectionImpl is using the default scale factor for a MapFn (1.0). It should be using 1.0 + the scale factor of the wrapped MapFn, in order to be accurate. > [0]: https://github.com/apache/crunch/blob/master/crunch-core/src/main/java/org/apache/crunch/fn/ExtractKeyFn.java > [1]: https://github.com/apache/crunch/blob/master/crunch-core/src/main/java/org/apache/crunch/impl/dist/collect/PCollectionImpl.java#L270 -- This message was sent by Atlassian JIRA (v6.3.4#6332)