首页 > 解决方案 > 异常 CreateSymbolicLink 错误 (183) 当文件已存在时无法创建该文件

问题描述

尝试从 Hadoop 附带的 hadoop-mapreduce-examples-3.3.1.jar 运行 wordcount 示例时出现此错误。

Exception message: CreateSymbolicLink error (183): Cannot create a file when that file already exists.



Shell output:         1 file(s) moved.
"Setting up env variables"
"Setting up job resources"


[2021-09-27 16:43:36.455]Container exited with a non-zero exit code 1.
[2021-09-27 16:43:36.455]Container exited with a non-zero exit code 1.
For more detailed output, check the application tracking page: http://DESKTOP-0N6IMAQ:8088/cluster/app/application_1632774426206_0006 Then click on links to logs of each attempt.
. Failing the application.
2021-09-27 16:43:36,780 INFO mapreduce.Job: Counters: 0

这是我提交的行

hadoop jar hadoop-mapreduce-examples-3.3.1.jar wordcount /input.txt /output.txt

标签: hadoophdfshadoop-yarn

解决方案


您的输出文件已经存在。更改输出文件的名称。

hadoop jar hadoop-mapreduce-examples-3.3.1.jar wordcount /input.txt /output2.txt

推荐阅读