Return-Path: Delivered-To: apmail-hadoop-core-user-archive@www.apache.org Received: (qmail 8236 invoked from network); 22 Jan 2009 15:24:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Jan 2009 15:24:36 -0000 Received: (qmail 6130 invoked by uid 500); 22 Jan 2009 15:24:29 -0000 Delivered-To: apmail-hadoop-core-user-archive@hadoop.apache.org Received: (qmail 6087 invoked by uid 500); 22 Jan 2009 15:24:29 -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 6075 invoked by uid 99); 22 Jan 2009 15:24:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jan 2009 07:24:29 -0800 X-ASF-Spam-Status: No, hits=4.0 required=10.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [72.165.244.2] (HELO medecision.com) (72.165.244.2) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jan 2009 15:24:22 +0000 Received: from medhq-mailgate2.medecision.com [192.168.10.176] by MEDecision Email Gateway - SurfControl E-mail Filter (6.0.1); Thu, 22 Jan 2009 10:13:00 -0500 Received: from MEDHQ-EXCHANGE.medecision.com ([192.168.10.171]) by medhq-mailgate2.medecision.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 22 Jan 2009 10:25:36 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C97CA5.AC43F387" Subject: Set the Order of the Keys in Reduce Date: Thu, 22 Jan 2009 10:25:28 -0500 Message-ID: <984A276028CB484E9082A2DE25282DDB0CC1C460@MEDHQ-EXCHANGE.medecision.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Set the Order of the Keys in Reduce Thread-Index: Acl8paf4WB5H303bSKKasj58Y0FR6g== From: "Brian MacKay" To: X-OriginalArrivalTime: 22 Jan 2009 15:25:36.0916 (UTC) FILETIME=[ACE8DD40:01C97CA5] X-SEF-DDCCCBDF-E7AC-408E-B3A8-ECAC12AAD06F: 1 X-SEF-Processed: 6_0_1_111__2009_01_22_10_13_00 X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C97CA5.AC43F387 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello,=0D=0A=0D=0A=20=0D=0A=0D=0AAny tips would be greatly appreciated.=0D=0A=0D= =0A=20=0D=0A=0D=0AIs there a way to set the order of the keys in reduce as = shown below, no=0D=0Amatter what order the collection in MAP occurs in.=0D=0A=0D= =0A=20=0D=0A=0D=0AThanks, Brian=0D=0A=0D=0A=20=0D=0A=0D=0A=20=0D=0A=0D=0A = public void map(WritableComparable key, Text values,=0D=0A=0D=0A = OutputCollector output, Reporter reporter)=0D=0Athrows IOExc= eption {=0D=0A=0D=0A=20=0D=0A=0D=0A //collect many C= AT=5FA and CAT=5FB in random order=0D=0A=0D=0A outpu= t.collect(CAT=5FA, details);=0D=0A=0D=0A output.coll= ect(CAT=5FB, details);=0D=0A=0D=0A=20=0D=0A=0D=0A }=0D=0A=0D=0A=20=0D=0A=0D= =0A=20=0D=0A=0D=0A=20=0D=0A=0D=0A public void reduce(Text key, Iterator values,=0D=0A=0D=0A OutputCollector out= put, Reporter=0D=0Areporter) throws IOException {=0D=0A=0D=0A=20=0D=0A=0D=0A= //always reduce CAT=5FA first, then reduce CAT=5FB=0D=0A=0D=0A =0D= =0A=0D=0A }=0D=0A=0D=0A=5F =5F =5F =5F =5F =5F =5F =5F =5F =5F =5F =5F =5F= =5F =5F =5F =5F =5F =5F =5F =5F =5F =5F =5F =5F =5F =5F =5F =5F =5F =5F =5F= =5F =5F =5F =5F =5F =5F=0D=0A=0D=0AThe information transmitted is intended= only for the person or entity to=20=0D=0Awhich it is addressed and may con= tain confidential and/or privileged=20=0D=0Amaterial. Any review, retransmi= ssion, dissemination or other use of, or=20=0D=0Ataking of any action in re= liance upon, this information by persons or=20=0D=0Aentities other than the= intended recipient is prohibited. If you received=20=0D=0Athis message in = error, please contact the sender and delete the material=20=0D=0Afrom any c= omputer.=0D=0A=0D=0A ------_=_NextPart_001_01C97CA5.AC43F387--