pangxia75 发表于 2018-10-30 12:56:21

hadoop1安全异常:The ratio of reported blocks 1.0000 has reached the threshold 0.9990

  hadoop默认情况下在安全模式运行。可以通过下面hadoop dfsadmin -safemode 参数,查看相关的状态和设置安全模块是否启用。
enter进入安全模式leave强制NameNode离开安全模式get   返回安全模式是否开启的信息  wait   等待,一直到安全模式结束。
  解决办法有二种:
  《1》可能运行命令hadoop dfsadmin -safemode leave 离开安全模式,但是每次都需要手动去设置。
  《2》通过配置dfs.safemode.threshold.pct的参数。默认情况下是0.9990f。这个配置可以在hdfs-defalut.xml中找到。我们可以把这个参数配置为0,永久关闭安全模式。
  在hadoop中的hdfs-site.xml添加如下配置:
  
  dfs.safemode.threshold.pct
  0f
  
  Specifies the percentage of blocks that should satisfy
  the minimal replication requirement defined by dfs.replication.min.
  Values less than or equal to 0 mean not to wait for any particular
  percentage of blocks before exiting safemode.
  Values greater than 1 will make safe mode permanent.
  
  
  重启NameNode就可以了。

页: [1]
查看完整版本: hadoop1安全异常:The ratio of reported blocks 1.0000 has reached the threshold 0.9990