hadoop worldcount程序 输出路径报错 :目录已经存在?

运行worldcount 程序一直报错。说输出目录已经存在!
一开始的路径是/test/output 报错/test/output already exists,我删除了output 又报错:/test already exists,,然后我新建了一个newoutput 又报错 /test/newouput already exists。。现在我把输出路径放到根目录下还是already exists!!!这个是什么情况???
Exception in thread "main" org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory file:/ already exists
at org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:146)
at org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs(JobSubmitter.java:266)
at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:139)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1290)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1287)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)

婷婷同学_
浏览 2008回答 1
1回答

宝慕林4294392

比如你想保存到 /temp/output目录下. 在/temp目录下必需要不存在output目录rm -rf /temp/outputhadoop jar worldcount /temp/input /temp/output
打开App,查看更多内容
随时随地看视频慕课网APP