Return-Path: Delivered-To: apmail-avro-dev-archive@www.apache.org Received: (qmail 98657 invoked from network); 21 Jul 2010 21:22:15 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Jul 2010 21:22:15 -0000 Received: (qmail 82563 invoked by uid 500); 21 Jul 2010 21:22:14 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 82506 invoked by uid 500); 21 Jul 2010 21:22:14 -0000 Mailing-List: contact dev-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list dev@avro.apache.org Received: (qmail 82498 invoked by uid 99); 21 Jul 2010 21:22:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jul 2010 21:22:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jul 2010 21:22:11 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o6LLLoHl019639 for ; Wed, 21 Jul 2010 21:21:50 GMT Message-ID: <21874059.505591279747310067.JavaMail.jira@thor> Date: Wed, 21 Jul 2010 17:21:50 -0400 (EDT) From: "Doug Cutting (JIRA)" To: dev@avro.apache.org Subject: [jira] Updated: (AVRO-581) java: add reducer that separates keys and values when map output is pairs In-Reply-To: <28870899.60211276796426450.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AVRO-581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Doug Cutting updated AVRO-581: ------------------------------ Status: Resolved (was: Patch Available) Hadoop Flags: [Reviewed] Resolution: Fixed > Could we do a similar thing for the Avro API? Sure. I made it so that, with a map-only job, you can call either setOutputSchema() or setMapOutputSchema(). > Otherwise, I'm +1 on this. Thanks for the reviews! I just committed this. > java: add reducer that separates keys and values when map output is pairs > ------------------------------------------------------------------------- > > Key: AVRO-581 > URL: https://issues.apache.org/jira/browse/AVRO-581 > Project: Avro > Issue Type: New Feature > Components: java > Reporter: Doug Cutting > Assignee: Doug Cutting > Fix For: 1.4.0 > > Attachments: AVRO-581.patch, AVRO-581.patch, AVRO-581.patch, AVRO-581.patch, weather-sorted.avro, weather.avro > > > We should add a Pair class, implementing SpecificRecord, that combines instances of two schemas (specific or generic). Pairs would be compared by key, ignoring value. The template for its schema would be: > {code} > {"type": "record", "name": "org.apache.avro.mapred.Pair", "fields":[ > {"name": "key", "type":" <>}, > {"name": "value", "order": "ignore", "type": <>} > ]} > {code} > When map outputs are instances of this class, a reducer may be used whose reduce method is something like: > public abstract void reduce(K key, Iterable values); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.