Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-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 21321F3BF for ; Tue, 26 Mar 2013 09:46:06 +0000 (UTC) Received: (qmail 20091 invoked by uid 500); 26 Mar 2013 09:46:01 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 19991 invoked by uid 500); 26 Mar 2013 09:46:00 -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 19530 invoked by uid 99); 26 Mar 2013 09:45:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Mar 2013 09:45:40 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yaojingguo@gmail.com designates 209.85.212.182 as permitted sender) Received: from [209.85.212.182] (HELO mail-wi0-f182.google.com) (209.85.212.182) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Mar 2013 09:45:35 +0000 Received: by mail-wi0-f182.google.com with SMTP id hi18so463289wib.15 for ; Tue, 26 Mar 2013 02:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=NxeYsqNcBhSqrlzXuY3rAccNo1XrXmjyHFiXpjLfzDc=; b=sLBphHk8hqZCSYCZKt7Nvtqm8kW43AuEq+hG2W5Uyl2ONOS2Xfo4E9X/5eXH5+7cmH dS+ToiyV8cQOEFAF4g6lawr/4pu4z3ITn3qSv1wBxx4NmPAU7jcqo0XzFQjFsbo+Q26v APKoxZD/kv9Mt4EB9YLL+NrG+ajr8qIIb6R7hPNMiBDTx3NxKcDaB1w7b8aNWaNKa4K2 Or0pewM1mySV2wrtgIZPSeR1ooTsOGH4rEl23Rmavh/Pm/N6lukA52ZlJcrQeDWPBZyN DOZdofOfrg+27DrC/RTbo1onAoHN4441j/IWf9+4Sf4ePAgzm9kq6T+ZZplQWGwwoeTH 81aA== MIME-Version: 1.0 X-Received: by 10.194.178.9 with SMTP id cu9mr23444407wjc.39.1364291115096; Tue, 26 Mar 2013 02:45:15 -0700 (PDT) Received: by 10.194.33.194 with HTTP; Tue, 26 Mar 2013 02:45:14 -0700 (PDT) In-Reply-To: References: Date: Tue, 26 Mar 2013 17:45:14 +0800 Message-ID: Subject: Re: Is the input values for reduce method sorted in any order? From: jingguo yao To: user@hadoop.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Harsh, thanks. On Tue, Mar 26, 2013 at 2:28 PM, Harsh J wrote: > MR will partition and sort inputs by keys by the key comparator, and > then group them together when reading back via a grouping comparator > (which is usually the same as the key comparator). It will not re-sort > the values nor look at any of the value's fields during this process. > > If you want your values to be sorted, implementing secondary sort > would need to happen wherein you extract the value-sort attributes > onto your keys and have them grouped differently. > > On Tue, Mar 26, 2013 at 10:55 AM, jingguo yao wrote: >> Is the Iterable values associated with a key sorted in any order? Are >> there are any configuration options controlling how the input values are >> sorted? >> >> I know that the secondary sort way can be used to achieve the same >> effect. I am not asking for a workaround. >> >> -- >> Jingguo > > > > -- > Harsh J -- Jingguo