MapReduce运行异常-- org.apache.hadoop.mapred.FileAlreadyExistsException
MapReduce运行异常--org.apache.hadoop.mapred.FileAlreadyExistsException
描述:输出文件已经存在
异常:
14/03/2623:00:52WARNmapred.JobClient:Nojobjarfileset.Userclassesmaynotbefound.SeeJobConf(Class)orJobConf#setJar(String).
14/03/2623:00:52INFOmapred.JobClient:Cleaningupthestagingareahdfs://xxx/opt/liveEpg/hadoop/hadoop_tmp/hadoop_hadoop/mapred/staging/allen/.staging/job_201312291735_0013
14/03/2623:00:52ERRORsecurity.UserGroupInformation:PriviledgedActionExceptionas:allencause:org.apache.hadoop.mapred.FileAlreadyExistsException:Outputdirectoryhdfs://xxx/mr/sort/sort_outalreadyexists
Exceptioninthread"main"org.apache.hadoop.mapred.FileAlreadyExistsException:Outputdirectoryhdfs://xxx/mr/sort/sort_outalreadyexists
atorg.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:137)
atorg.apache.hadoop.mapred.JobClient$2.run(JobClient.java:887)
atorg.apache.hadoop.mapred.JobClient$2.run(JobClient.java:850)
atjava.security.AccessController.doPrivileged(NativeMethod)
atjavax.security.auth.Subject.doAs(Subject.java:396)
atorg.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
atorg.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:850)
atorg.apache.hadoop.mapreduce.Job.submit(Job.java:500)
atorg.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:530)
atsmiple.Sort.main(Sort.java:84)
解决办法:
将输出目录中相关文件删除,我一般直接将输出目录删了
命令:hadoopfs-rmr/mr/sort/sort_out
相关推荐
通过实现MapReduce计算结果保存到MySql数据库过程,掌握多种方式保存计算结果的技术,加深了对MapReduce的理解;创建maven项目,项目名称hdfs,这里不再说明。红色部分为增加内容: