栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

Hadoop 安全模式永久退出的方法

Hadoop 安全模式永久退出的方法

在HDFS配置文件中修改安全模式阀值

在hdfs-site.xml中设置安全阀值属性,属性值默认为0.999f,如果设为1则不进行安全检查


  dfs.safemode.threshold.pct
  0.999f
  
    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.
  


把其中的0.999f改为 1f


  dfs.safemode.threshold.pct
  1f
  
    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.
  

这样更改配置文件,将会永久性解决hadoop安全模式启动的问题

2、直接在bash输入指令脱离安全模式(推荐)
在安全模式下输入指令:

hadoop dfsadmin -safemode leave

即可退出安全模式
这种退出方式是临时退出当次hadoop安全模式,在下一次进入hadoop时还是会启动安全模式

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/613241.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号