转载来自lk
1. 在HDFS的配置界面,搜索“hdfs-site.xml”,找到Namenode高级配置代码段(安全阀),增加红色框中的内容,把"dfs.namenode.support.allow.format"这个参数的值(默认为true)设为false,表示禁止namenode格式化
2.搜索官网发现这是一个hdfs-site.xml的参数,默认为true,表示允许格式化。
dfs.namenode.support.allow.format | true | Does HDFS namenode allow itself to be formatted? You may consider setting this to false for any production cluster, to avoid any possibility of formatting a running DFS. |