一、问题描述
第一次添加hdfs服务,有警告一个服务没有启动对。就删除了hdfs。然后重新安装hdfs服务,就报错
Formatting the name directories of the current NameNode. If the name directories are not empty, this is expected to fail.
Command (71) has failed
NameNode (hadoop)
Dec 29, 12:13:33 AM 2.66s
Format
Failed to format NameNode.
二、问题原因
之前的namenode格式化了,所以这次不能格式化,需要把原来格式化的删除。
三、解决
1.在/dfs目录下有dn或者nn
[root@hadoop dfs]# ls /dfs/
nn snn
删除三台机器(所有机器)的/dfs目录
rm -rf /dfs/
2.然后点击retry即可