Return-Path: Delivered-To: apmail-hadoop-general-archive@minotaur.apache.org Received: (qmail 57253 invoked from network); 17 Nov 2009 04:11:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Nov 2009 04:11:24 -0000 Received: (qmail 62437 invoked by uid 500); 17 Nov 2009 04:11:23 -0000 Delivered-To: apmail-hadoop-general-archive@hadoop.apache.org Received: (qmail 62329 invoked by uid 500); 17 Nov 2009 04:11:21 -0000 Mailing-List: contact general-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@hadoop.apache.org Delivered-To: mailing list general@hadoop.apache.org Received: (qmail 62319 invoked by uid 99); 17 Nov 2009 04:11:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Nov 2009 04:11:21 +0000 X-ASF-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hkumar.arora@gmail.com designates 209.85.223.188 as permitted sender) Received: from [209.85.223.188] (HELO mail-iw0-f188.google.com) (209.85.223.188) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Nov 2009 04:11:19 +0000 Received: by iwn26 with SMTP id 26so4925518iwn.5 for ; Mon, 16 Nov 2009 20:10:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=FUME7HjkGUZtAnSh/GSypixY2+01H1yyEXXrGAtbFFY=; b=Ik3lfkGokZ47c7uvA/CRftYdiLC85niarf2XtSbuwWtGUFNjzfbsEdNcp2AAnbvHz9 xtyfVFTrLIdigKCkackOFKDMfRpoMxyIFY+o7Z/m7DztQx6sTFUs9qxsNCNDxxL9Oi8C tzW+bwVi/yV8H9nli04hB4b+jd5eUHCkA3IGc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=J0WQbkDG1SF4FvdySmEvzQNQ/4RViuSo5d7ItqOu2kDxjiFoH7nNJJb2jHBxWIsZ0J 04I4aoQyjk+uUUwkgmHHJ88JwpTeiOQ3bSqFK8RUjWzAQeAvsol9W8xQOOVFvwe1beLO HKa76nLvz547hvjcQcgdf2Azt8pUyFKUw5tQQ= MIME-Version: 1.0 Received: by 10.231.158.205 with SMTP id g13mr960199ibx.30.1258431058069; Mon, 16 Nov 2009 20:10:58 -0800 (PST) In-Reply-To: <5f7f740b0911161947h5e001e15q9a15816f972aa08e@mail.gmail.com> References: <1eabbac30911161143t4102be0brd0555eed21dd8572@mail.gmail.com> <5f7f740b0911161947h5e001e15q9a15816f972aa08e@mail.gmail.com> Date: Tue, 17 Nov 2009 13:10:58 +0900 Message-ID: Subject: Re: Values returned by Map to Reducer From: Harshit Kumar To: general@hadoop.apache.org Content-Type: multipart/alternative; boundary=00504501416d30c7680478895009 --00504501416d30c7680478895009 Content-Type: text/plain; charset=UTF-8 Oh Yes, you are right, i replied to this mail, saying yes. However, that yes was for the keys which are sorted. sorry for the confusion. H. Kumar Phone(Mobile): +82-10-2892-9663 Phone(Office): +82-31- skype: harshit900 Blog: http://harshitkumar.wordpress.com Website: http:/kumarharmuscat.tripod.com 2009/11/17 Owen O'Malley > On Mon, Nov 16, 2009 at 11:43 AM, Something Something < > mailinglists19@gmail.com> wrote: > > > Does Hadoop Mapreduce guarantee that the *values* returned by Mapper to > the > > Reducer are sorted? Can I safely assume that? Would it always be true - > > at > > least for 'Text' type? > > > > public void reduce(Text key, *Iterable values*, Context context > > > > No, the values will *not* be sorted. In fact, it will be non-deterministic > between multiple runs of the job with the same input. The keys will always > be sorted. If you want the values to be sorted, you need to take additional > steps. Please look at the SecondarySort example. It shows exactly how to > get > the values sorted in the order you desire. > > -- Owen > --00504501416d30c7680478895009--