Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-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 7AAFA1762E for ; Thu, 12 Mar 2015 16:48:33 +0000 (UTC) Received: (qmail 62191 invoked by uid 500); 12 Mar 2015 16:48:21 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 62089 invoked by uid 500); 12 Mar 2015 16:48:21 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 62079 invoked by uid 99); 12 Mar 2015 16:48:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Mar 2015 16:48:21 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of xeonmailinglist@gmail.com designates 209.85.212.178 as permitted sender) Received: from [209.85.212.178] (HELO mail-wi0-f178.google.com) (209.85.212.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Mar 2015 16:48:14 +0000 Received: by wivr20 with SMTP id r20so21950037wiv.3 for ; Thu, 12 Mar 2015 09:47:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=MRf2EXR068vvgKc3jcshT8vVqBWuA6xqWViz6BTSt0A=; b=vTKaG8UVfw9YItK8Z1GSR/fwND+8NvXnF+umJS55JgsF4Ab8/yiGqAo+mgJGc2kHPp 3yNXr9CnNTLqW6ZQ2d2S9S/nzbeUuO8+804AE42lTCAnFRM15LRiPhQMJYOcHn8hPwjm iGT7GipVQGF/JjayYrEk2Wk8/zhiu+4ka9DA27YIcyGHj9u5kuFPGjKodQo3LKdiNJvq N1FKmp07RORsVG68fiYbYuMf4KaQhP97kN1gcjSLsfXW4X/wW3WwxX6mxsqOQZ0o9F2D r/U7KcmJWYC79SfgCPDxBNRObOCWw1JFVApSENIFWudb27M+pZo1sXnIOLWK6vxFUHHN Ahzg== X-Received: by 10.194.185.9 with SMTP id ey9mr90232892wjc.135.1426178828680; Thu, 12 Mar 2015 09:47:08 -0700 (PDT) Received: from [10.101.225.109] ([194.117.18.101]) by mx.google.com with ESMTPSA id hl8sm10804537wjb.38.2015.03.12.09.47.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Mar 2015 09:47:08 -0700 (PDT) Message-ID: <5501C30A.2050308@gmail.com> Date: Thu, 12 Mar 2015 16:47:06 +0000 From: xeonmailinglist-gmail User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "user@hadoop.apache.org" Subject: Fwd: Re: Prune out data to a specific reduce task References: <72830A6F-963F-400B-B898-231454F6EE22@gmail.com> In-Reply-To: <72830A6F-963F-400B-B898-231454F6EE22@gmail.com> X-Forwarded-Message-Id: <72830A6F-963F-400B-B898-231454F6EE22@gmail.com> Content-Type: multipart/alternative; boundary="------------090105020805050803000000" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------090105020805050803000000 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit If I use the partitioner, I must be able to tell map reduce to not execute values from a certain reduce tasks. The method |public int getPartition(K key, V value, int numReduceTasks)| must always return a partition. I can’t return -1. Thus, I don’ t know how to tell Mapreduce to not execute data from a partition. Any suggestion? ———— Forwarded Message ———— Subject: Re: Prune out data to a specific reduce task Date: Thu, 12 Mar 2015 12:40:04 -0400 From: Fei Hu hufei68@gmail.com Reply-To: user@hadoop.apache.org To: user@hadoop.apache.org Maybe you could use Partitioner.class to solve your problem. > On Mar 11, 2015, at 6:28 AM, xeonmailinglist-gmail > > wrote: > > Hi, > > I have this job that has 3 map tasks and 2 reduce tasks. But, I want > to excludes data that will go to the reduce task 2. This means that, > only reducer 1 will produce data, and the other one will be empty, or > even it doesn't execute. > > How can I do this in MapReduce? > > > > > Thanks, > > -- > -- ​ --------------090105020805050803000000 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

If I use the partitioner, I must be able to tell map reduce to not execute values from a certain reduce tasks.

The method public int getPartition(K key, V value, int numReduceTasks) must always return a partition. I can’t return -1. Thus, I don’ t know how to tell Mapreduce to not execute data from a partition. Any suggestion?

———— Forwarded Message ————

Subject: Re: Prune out data to a specific reduce task

Date: Thu, 12 Mar 2015 12:40:04 -0400

From: Fei Hu hufei68@gmail.com

Reply-To: user@hadoop.apache.org

To: user@hadoop.apache.org

Maybe you could use Partitioner.class to solve your problem.

On Mar 11, 2015, at 6:28 AM, xeonmailinglist-gmail <xeonmailinglist@gmail.com> wrote:

Hi,

I have this job that has 3 map tasks and 2 reduce tasks. But, I want to excludes data that will go to the reduce task 2. This means that, only reducer 1 will produce data, and the other one will be empty, or even it doesn't execute.

How can I do this in MapReduce?

<ExampleJobExecution.png>


Thanks,

-- 
--

--------------090105020805050803000000--