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 >> how can I delete a file in pig only after checking if the file exists?


Copy link to this message
-
how can I delete a file in pig only after checking if the file exists?
Hi all,

Sorry to bother you guys, I used rm FILE_PATH to delete the file in pig
script, but sometimes if the file does not exist, or I am not sure if it
exists, this statement will give some error when I run it.

So is there any method so that I can delete a file in pig script only after
checking the file exists?

Thanks!
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