Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4263643C1 for ; Wed, 8 Jun 2011 16:51:59 +0000 (UTC) Received: (qmail 91562 invoked by uid 500); 8 Jun 2011 16:51:56 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 91517 invoked by uid 500); 8 Jun 2011 16:51:56 -0000 Mailing-List: contact common-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-user@hadoop.apache.org Delivered-To: mailing list common-user@hadoop.apache.org Received: (qmail 91508 invoked by uid 99); 8 Jun 2011 16:51:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2011 16:51:56 +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 harsh@cloudera.com designates 209.85.210.176 as permitted sender) Received: from [209.85.210.176] (HELO mail-iy0-f176.google.com) (209.85.210.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2011 16:51:49 +0000 Received: by iym1 with SMTP id 1so870712iym.35 for ; Wed, 08 Jun 2011 09:51:28 -0700 (PDT) Received: by 10.42.140.66 with SMTP id j2mr11052531icu.215.1307551888137; Wed, 08 Jun 2011 09:51:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.218.72 with HTTP; Wed, 8 Jun 2011 09:51:08 -0700 (PDT) In-Reply-To: References: From: Harsh J Date: Wed, 8 Jun 2011 22:21:08 +0530 Message-ID: Subject: Re: MultipleTextOutputFormat - temp dir does not exist error To: common-user@hadoop.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Madhu, Are you multi-threading in your Reducer code by any chance? MTOF may not be thread-safe in the release you're using. Using MultipleOutputs is recommended right now, if this is the cause/case. On Wed, Jun 8, 2011 at 7:58 PM, Madhu Ramanna wrote: > Hello, > > We're using CDH3b3 0.20.2 hadoop. In our map reduce jobs we've extended M= ultipleTextOutputFormat to override checkOutputSpecs() and generateFileName= ForKeyValue() returning > relative path based on key. I don't have multiple jobs running with the s= ame output directory. When I rerun it succeeds; a couple of runs later it f= ails. Here is a log from failed attempts: > > > attempt 0 > > java.io.IOException: The temporary job-output directory > hdfs://nn:8000/griffin/prod/_temporary doesn't exist! at > org.apache.hadoop.mapred.FileOutputCommitter.getWorkPath(FileOutputCommit= te r.java: > 250) at > org.apache.hadoop.mapred.FileOutputFormat.getTaskOutputPath(FileOutputFor= ma t.java: > 240) at > org.apache.hadoop.mapred.TextOutputFormat.getRecordWriter(TextOutputForma= t. java: > 129) at > org.apache.hadoop.mapred.lib.MultipleTextOutputFormat.getBaseRecordWriter= (M ultipleTextOutputFormat.java: > 47) at org.apache.hadoop.mapred.lib.MultipleOutputFormat > $1.write(MultipleOutputFormat.java:102) at > org.apache.hadoop.mapred.ReduceTask$3.collect(ReduceTask.java:444) at > com.buysight.griffin.UserHistory$MyReducer.reduce(UserHistory.java: > 672) at com.buysight.griffin.UserHistory > $MyReducer.reduce(UserHistory.java:148) at > org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:467) > at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:415) at > org.apache.hadoop.mapred.Child$4.run(Child.java:217) at > java.security.AccessController.doPrivileged(Native Method) at > javax.security.auth.Subject.doAs(Subject.java:396) at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation= .j ava: > 1063) at org.apache.hadoop.mapred.Child.main(Child.java:211) > > attempt 1 > > org.apache.hadoop.ipc.RemoteException: > org.apache.hadoop.hdfs.server.namenode.LeaseExpiredException: No lease > on /griffin/prod/_temporary/_attempt_201106061713_0045_r_000000_1/ > s2_conv/20110530/part-00000.bz2 File does not exist. Holder > DFSClient_attempt_201106061713_0045_r_000000_1 does not have any open > files. at > org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkLease(FSNamesyst= em .java: > 1488) at > org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkLease(FSNamesyst= em .java: > 1479) at > org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FS= Na mesystem.java: > 1395) at > org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java: > 588) at sun.reflect.GeneratedMethodAccessor249.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mp l.java: > 25) at java.lang.reflect.Method.invoke(Method.java:597) at > org.apache.hadoop.ipc.RPC$Server.call(RPC.java:528) at > org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1319) at > org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1315) at > java.security.AccessController.doPrivileged(Native Method) at > javax.security.auth.Subject.doAs(Subject.java:396) at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation= .j ava: > 1063) at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1313) at > org.apache.hadoop.ipc.Client.call(Client.java:1054) at > org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:226) at > $Proxy1.addBlock(Unknown Source) at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java= : > 39) at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mp l.java: > 25) at java.lang.reflect.Method.invoke(Method.java:597) at > org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvoc= at ionHandler.java: > 82) at > org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationH= an dler.java: > 59) at $Proxy1.addBlock(Unknown Source) at > org.apache.hadoop.hdfs.DFSClient > $DFSOutputStream.locateFollowingBlock(DFSClient.java:3166) at > org.apache.hadoop.hdfs.DFSClient > $DFSOutputStream.nextBlockOutputStream(DFSClient.java:3036) at > org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access > $1900(DFSClient.java:2288) at org.apache.hadoop.hdfs.DFSClient > $DFSOutputStream$DataStreamer.run(DFSClient.java:2483) > > I've tried turning off speculative execution. Still no luck. =A0What give= s ? > > Thanks, > Madhu > --=20 Harsh J