集群的时间同步

集群的时间同步:
1、date -s ''

2、ntpdate
配置时间服务器:
选定hadoop01做为时间服务器
1、在hadoop01上安装ntp(ntpdate)
2、设置ntp
vi /etc/ntp.conf

restrict 192.168.137.0 mask 255.255.255.0 nomodify notrap

注释掉4条公网的服务:
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst

将本机做为时间服务器
server 127.127.1.0


配置crontab:
*/1 * * * * /usr/sbin/ntpdate hadoop01 >> /dev/null


Name node is in safe mode.The reported blocks 356 needs additional 2 blocks to reach the threshold 0.9990 of total blocks 358. Safe mode will be turned off automatically.
解决办法:
法一、暴力的直接将整个文件系统格式化:hdfs namenode -format
法二、将其控制安全模式的阀值调小:dfs.namenode.safemode.threshold-pct
 (将其该值调整整) 
法三、使用命令离强制开安全模式然后再检测损坏block并删除:
第一步.
 hdfs dfsadmin -safemode leave (强制离开安全模式)
第二步.
 hdfs fsck / -delete (删除掉损坏的blocks)
 如果想修复,可以使用linux的/sbin/fsck修复工具。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值