Output directory hdfs://hadoop:8020/user/root/output already exists

异常提示:

 ERROR tool.ImportTool: Import failed: org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory hdfs://hadoop:8020/user/root/output already exists

解决方案:

这是因为每次MR都会生成一个output目录但是不能自动删除,所以我们就把HDFS的输出目录删除:

hadoop fs -ls -R:查看目录

hadoop fs -rmr output:删除输出目录

猜你喜欢

转载自blog.csdn.net/lilychen1983/article/details/80895222