Return-Path: X-Original-To: apmail-avro-dev-archive@www.apache.org Delivered-To: apmail-avro-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 547EAE9A2 for ; Tue, 22 Jan 2013 04:36:15 +0000 (UTC) Received: (qmail 58533 invoked by uid 500); 22 Jan 2013 04:36:15 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 58383 invoked by uid 500); 22 Jan 2013 04:36: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 58355 invoked by uid 99); 22 Jan 2013 04:36:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jan 2013 04:36:13 +0000 Date: Tue, 22 Jan 2013 04:36:13 +0000 (UTC) From: "Ashish Nagavaram (JIRA)" To: dev@avro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AVRO-1215) AvroMultipleOutputs not working when specifying baseOutputPath 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-1215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13559392#comment-13559392 ] Ashish Nagavaram commented on AVRO-1215: ---------------------------------------- just to add to the earlier comment, the updated method looks like write(K,V,keySchema,valSchema,baseOutputPath). > AvroMultipleOutputs not working when specifying baseOutputPath > -------------------------------------------------------------- > > Key: AVRO-1215 > URL: https://issues.apache.org/jira/browse/AVRO-1215 > Project: Avro > Issue Type: Bug > Components: java > Affects Versions: 1.7.2 > Reporter: Matthew Hayes > Assignee: Ashish Nagavaram > Labels: avro, mapreduce > Attachments: avro-1215.patch, AVRO-1215.patch > > > I'm calling the write() method of AvroMultipleOutputs which takes the baseOutputPath. The reducer appears to begin hanging once it tries writing to a baseOuputPath value not already encountered. It then fails with: > org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException: failed to create file ... because current leaseholder is trying to recreate file. > I think the problem has to do with this line in AvroMultipleOutputs: > {code} > // get the record writer from context output format > //FileOutputFormat.setOutputName(taskContext, baseFileName); > {code} > This line is not commented out in the similar code from Hadoop. So I think the baseOutputPath is ignored. As a result when each record writer is created it uses the same path, leading to the exception. > Uncommenting this line does not work because of visibility of the method. However what this method does is set "mapreduce.output.basename". But setting this doesn't work either. > After digging through Avro code I found that AvroOutputFormatBase is using "avro.mo.config.namedOutput" to create the path. If I replace the commented out line with this it seems to work: > {code} > taskContext.getConfiguration().set("avro.mo.config.namedOutput", baseFileName); > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira