Return-Path: Delivered-To: apmail-hadoop-core-user-archive@www.apache.org Received: (qmail 96335 invoked from network); 12 Jun 2009 18:41:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Jun 2009 18:41:06 -0000 Received: (qmail 30580 invoked by uid 500); 12 Jun 2009 18:26:04 -0000 Delivered-To: apmail-hadoop-core-user-archive@hadoop.apache.org Received: (qmail 30037 invoked by uid 500); 12 Jun 2009 18:26:03 -0000 Mailing-List: contact core-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-user@hadoop.apache.org Delivered-To: mailing list core-user@hadoop.apache.org Received: (qmail 28713 invoked by uid 99); 12 Jun 2009 18:25:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jun 2009 18:25:53 +0000 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=HTML_MESSAGE,SPF_PASS,SUBJECT_FUZZY_TION X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [66.163.179.215] (HELO web36101.mail.mud.yahoo.com) (66.163.179.215) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 12 Jun 2009 18:25:42 +0000 Received: (qmail 30905 invoked by uid 60001); 12 Jun 2009 18:25:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1244831121; bh=C0ULa6zVU3jIkXnN4b9PRsdjTxxUKwkV+JFvyI8r8FY=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=5TKmRG+w4PJ7AkT55iC+Yu03m1nsnaG5F1cAQRo/KucQJGWAxvaPFOe5Stx1ndRa2U0sMAVES3S2fJU3roiZIXqUxO3LJosZWhxeQZZ9zLMPOLS9EvfBhbT+C6Bv2av2S9BinIYn1DBpYiPuAVXBAuX+0KXsfwMKACun7BSSvDg= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=O1cjDYykMREPwJTwooY8UIQeG4KAVKk6AAZZaBrxYHhrGfJ1akGArWCp+2rpt5mnjbOtDFyC4r/UPx00nDjopuKx9prP3C4LFa1bv8NwkZ8GF3JHDr9Ic/l5G9vrG/cE4ndRqVMYTWtGMlX/a6c+gY1s896sjuJpTvWgT3rc7bI=; Message-ID: <32285.60871.qm@web36101.mail.mud.yahoo.com> X-YMail-OSG: tJvqdHIVM1l_gtvyogYghMTFUlWUB1x9Mg6QVPx4b7etWkrEWH2eY5r6iawvV.xXlCmmJTkblMuxz_l3a2GMyZUN.ClJIg2APqI4oXymPoUE7PMIKDCIz1jWYp4ctzmBupH3_u.SMzl1ILVuHQ1WKlgRHGPavzlgazwqRktSkQBDxls90yPnhsNImCy_RJK2SvNfQMrI89KWHuNPPirbcGiSNgv3nB4EHRqJaprQ5yCDIiToMYzacowgd6YcyonXfzo78Qfcs0z_xccMPGahUqm1lhOrA5tNya3ryqyZlAVOrSzf8aualQ-- Received: from [131.94.129.128] by web36101.mail.mud.yahoo.com via HTTP; Fri, 12 Jun 2009 11:25:20 PDT X-Mailer: YahooMailRC/1277.43 YahooMailWebService/0.7.289.15 Date: Fri, 12 Jun 2009 11:25:20 -0700 (PDT) From: Zhengguo 'Mike' SUN Subject: The behavior of HashPartitioner To: core-user@hadoop.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-399386578-1244831120=:60871" X-Virus-Checked: Checked by ClamAV on apache.org --0-399386578-1244831120=:60871 Content-Type: text/plain; charset=us-ascii Hi, The intermediate key generated by my Mappers is IntWritable. I tested with different number of Reducers. When the number of Reducers is the same as the number of different keys of intermediate output. It partitions perfectly. Each Reducer receives one input group. When these two numbers are different, the partitioning function becomes difficult to understand. For example, when the number of keys is less than the number of Reducers, I am expecting that each Reducer at most receive one input group. But it turns out that many Reducers receive more than one input group. On the other hand, when the number of keys is larger than the number of Reducers, I am expecting that each Reducer at least receive one input group. But it turns out that some Reducers receive nothing to process. The expectation I had is from the implementation of HashPartitioner class, which just uses modulo operator with the number of Reducers to generate partitions. Anyone has any insights into this? --0-399386578-1244831120=:60871--