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 D1373200C54 for ; Wed, 12 Apr 2017 20:52:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CFA4F160B85; Wed, 12 Apr 2017 18:52:45 +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 210CF160B95 for ; Wed, 12 Apr 2017 20:52:44 +0200 (CEST) Received: (qmail 83324 invoked by uid 500); 12 Apr 2017 18:52:44 -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 83312 invoked by uid 500); 12 Apr 2017 18:52:44 -0000 Delivered-To: apmail-incubator-crunch-dev@incubator.apache.org Received: (qmail 83309 invoked by uid 99); 12 Apr 2017 18:52:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Apr 2017 18:52:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id EBD8B181059 for ; Wed, 12 Apr 2017 18:52:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id CWDBCGuzqp1W for ; Wed, 12 Apr 2017 18:52:43 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 94C415F65C for ; Wed, 12 Apr 2017 18:52:42 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id EEEBFE06C5 for ; Wed, 12 Apr 2017 18:52:41 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id AE27520D59 for ; Wed, 12 Apr 2017 18:52:41 +0000 (UTC) Date: Wed, 12 Apr 2017 18:52:41 +0000 (UTC) From: "Josh Wills (JIRA)" To: crunch-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CRUNCH-642) Enable numReducers option for methods in Distinct MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 12 Apr 2017 18:52:46 -0000 [ https://issues.apache.org/jira/browse/CRUNCH-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15966391#comment-15966391 ] Josh Wills commented on CRUNCH-642: ----------------------------------- [~xaviert] it is more flexible, but it involves a backwards incompatible change to the API, which I generally try to avoid; no problem with adding another method that exposes the GroupingOptions, but please do not remove the existing API method here. > Enable numReducers option for methods in Distinct > ------------------------------------------------- > > Key: CRUNCH-642 > URL: https://issues.apache.org/jira/browse/CRUNCH-642 > Project: Crunch > Issue Type: Improvement > Components: Core > Affects Versions: 0.14.0 > Reporter: Xavier > Assignee: Josh Wills > Priority: Trivial > Attachments: CRUNCH-642-Enable-GroupingOptions-for-Distinct-operations.patch, CRUNCH-642.patch > > > The {{groupByKey}} invocation in the {{Distinct}} class currently uses the default (recommended) number of reducers without providing an option to override this: > {code} > public static PCollection distinct(PCollection input, int flushEvery) { > Preconditions.checkArgument(flushEvery > 0); > PType pt = input.getPType(); > PTypeFamily ptf = pt.getFamily(); > return input > .parallelDo("pre-distinct", new PreDistinctFn(flushEvery, pt), ptf.tableOf(pt, ptf.nulls())) > .groupByKey() > .parallelDo("post-distinct", new PostDistinctFn(), pt); > } > {code} > Would it be possible to enhance this method such that it is possible to customize the number of reducers? Either explicitly or via a {{GroupingOptions}} object. -- This message was sent by Atlassian JIRA (v6.3.15#6346)