How to force STORE (overwrite) to HDFS in Pig?

来源:互联网 发布:冬天去哈尔滨 知乎 编辑:程序博客网 时间:2024/06/07 17:04

问题:

 Pig Grunt 中,fs -rmr /apps/hive/warehouse/tmp_test 可以正常运行

直接运行pig -param_file/home/hive/sample.params /home/hive/preprocess.pig ,如果已经有/apps/hive/warehouse/tmp_test 文件存在,会报错;

2012-06-19 19:22:49,680 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 6000: Output Location Validation Failed for: 'hdfs://[server]/user/[user]/foo/bar More info to follow:Output directory hdfs://[server]/user/[user]/foo/bar already exists

解决方案:

http://stackoverflow.com/questions/11110403/how-to-force-store-overwrite-to-hdfs-in-pig

rmf foo/bar

0 0
原创粉丝点击