Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig, mail # user - Delete Output Folder in Pig Script


Copy link to this message
-
Re: Delete Output Folder in Pig Script
inelu nagamallikarjuna 2013-09-11, 14:19
Hai,

Just include fs -rmr directory path as first line of the pig script.

Thanks
Naga
On Sep 11, 2013 7:39 PM, "Dip Kharod" <[EMAIL PROTECTED]> wrote:

> Hi,
> My Pig script stores data in an HDFS folder and I want to delete
> those folders (like in MapReduce with File object) in the script, every
> time I run it - don't want to delete manually.
> My attempt with “hadoop fs –rmr” or “rmf” does not work – meaning Pig
> script execution fails saying that destination folder exists (I need to
> manually delete the folder prior to running the script) It looks
> like the first thing that the interpreter does is check for the output
> folder
> check.
> Any pointers is appreciated.
> Thanks,Dip