Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 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
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
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB