Well for learning purposes you can delete the output directory before
you submit the job. FileSystem.get(conf).delete(outputPath) I believe
is the snippet for that.

But again, _strictly_ for learning purposes ONLY. Never do this as
your default outputs are always named as part-{r-}00000 onwards and
you will lose them.

Another tip is -- try not to fail; mapper/reducer logic isn't so big
generally, to avoid reviewing before submitting :)

On Thu, Aug 26, 2010 at 10:00 PM, Mark <[email protected]> wrote:
>  /Exception in thread "main"
> org.apache.hadoop.fs.FileAlreadyExistsException: Output directory
> playground/output already exi/sts
>
> Is there anyway to force writing to an existing directory? It's quite
> annoying to keep specifiying a seperate output directory on each run..
> especially when my task fails.
>
> Thanks
>



-- 
Harsh J
www.harshj.com

Reply via email to