Raja, When you get to developing your own jobs, you can surely override the "FileOutputFormat.checkOutputSpecs" method in the API for your custom output formats. This default behavior is provided as a safeguard, but is surely overridable.
On Mon, Jun 20, 2011 at 4:42 PM, Raja Nagendra Kumar <[email protected]> wrote: > > Hi, > > Wordcount example which shipped with hadoop, expects the output directory > not exists and if one exists (due to previous session), it throws the error > like this.. > > org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory output > already exists > at > org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:134) > at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:830) > at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:791) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:416) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1059) > at > org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:791) > at org.apache.hadoop.mapreduce.Job.submit(Job.java:465) > at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:494) > at org.apache.hadoop.examples.WordCount.main(WordCount.java:67) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > > > It would nice to let the example warn and ask for overwrite permission > rather throwing this error and stopping. > > Regards, > Raja Nagendra Kumar, > C.T.O > www.tejasoft.com > Services 3.0 - Beyond Bodies and CV Selling. > -- > View this message in context: > http://old.nabble.com/wordcount-example-error-tp31884736p31884736.html > Sent from the Hadoop core-user mailing list archive at Nabble.com. > > -- Harsh J
