Return-Path: Delivered-To: apmail-avro-dev-archive@www.apache.org Received: (qmail 58546 invoked from network); 14 Jun 2010 21:33:37 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Jun 2010 21:33:37 -0000 Received: (qmail 35058 invoked by uid 500); 14 Jun 2010 21:33:37 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 35020 invoked by uid 500); 14 Jun 2010 21:33:36 -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 35012 invoked by uid 99); 14 Jun 2010 21:33:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jun 2010 21:33:36 +0000 X-ASF-Spam-Status: No, hits=-1519.5 required=10.0 tests=ALL_TRUSTED,AWL 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; Mon, 14 Jun 2010 21:33:35 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o5ELXEbd001229 for ; Mon, 14 Jun 2010 21:33:15 GMT Message-ID: <30717392.86551276551194212.JavaMail.jira@thor> Date: Mon, 14 Jun 2010 17:33:14 -0400 (EDT) From: "Doug Cutting (JIRA)" To: dev@avro.apache.org Subject: [jira] Updated: (AVRO-513) java mapreduce api should pass iterator of matching objects to reduce MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AVRO-513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Doug Cutting updated AVRO-513: ------------------------------ Attachment: AVRO-513.patch > This could be improved to be a copy per reduce group, although it's more work. I suppose once a value's been consumed from the queue it could be returned to a pool used by the deserializer. We could limit the size of the pool to be the same size as the queue. Is that what you had in mind? > The next() method should check to see if there is a next and throw NoSuchElementException if not. Fixed. > Rather than polling the queue, you could use the blocking take() method and interrupt the thread from close() to signal that there are no more values. Here's a version that does this. I worry a bit that something else could interrupt the thread or intercept the InterruptedException, e.g., in the user's reducer. Is that a well-founded worry? A better approach might be to put in a sentinel value. Unfortunately this has to be of type T, and we don't know how to construct a T. > Starting a thread from within a subclass constructor is unsafe. Fixed. > java mapreduce api should pass iterator of matching objects to reduce > --------------------------------------------------------------------- > > Key: AVRO-513 > URL: https://issues.apache.org/jira/browse/AVRO-513 > Project: Avro > Issue Type: Improvement > Components: java > Reporter: Doug Cutting > Assignee: Doug Cutting > Fix For: 1.4.0 > > Attachments: AVRO-513.patch, AVRO-513.patch > > > The Java mapreduce API added in AVRO-493 requires reducers implementations to explicitly detect sequences of matching data. > Rather the reduce method might better look something like: > void reduce(Iterator, Collector); > Where all equal values are passed in a single call. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.