cause:org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory hdfs://localhost:54310/u

原文地址:http://hi.baidu.com/xucha00/item/16ac5f57ea3201c39e266751

12/05/28 09:33:37 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.

12/05/28 09:33:37 INFO mapred.JobClient: Cleaning up the staging area file:/tmp/hadoop-Hadoop/mapred/staging/Hadoop-1983717839/.staging/job_local_0001

12/05/28 09:33:37 ERROR security.UserGroupInformation: PriviledgedActionException as:Hadoop (auth:SIMPLE) cause:org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory hdfs://localhost:54310/user/Hadoop/input/cxu_index already exists

Exception in thread "main" org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory hdfs://localhost:54310/user/Hadoop/input/cxu_index already exists

at org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:132)

at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:872)

at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:833)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.Subject.doAs(Subject.java:396)

at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1157)

at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:833)

at org.apache.hadoop.mapreduce.Job.submit(Job.java:476)

at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:506)

at com.payegis.caesar.hdfsindex.Main.main(Main.java:58)

 ==================================================================================================

 

hadoop 由于进行的是耗费资源的计算,生产的结果默认是不能被覆盖的,

因此中间结果输出目录一定不能存在,否则出现这个错误。

 

就是这句代码:

FileOutputFormat.setOutputPath( job, new Path(args[1]) );

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值