美文网首页
Hadoop HA 主备手动切换

Hadoop HA 主备手动切换

作者: 星星队长 | 来源:发表于2019-03-08 14:39 被阅读0次

将 active 状态由 nn2 切换到 nn1

hdfs haadmin -failover --forcefence --forceactive nn2 nn1

在启用自动故障转移的集群上 --forcefence -- forceactive 参数不起作用
使用以下方法检查名称节点状态(假设 nn1 为 standby,nn2 为 active):
hdfs haadmin -getServiceState nn1
standby
hdfs haadmin -getServiceState nn2
active
于是我们人为制造故障,在 nn2 上查看 NameNode 进程
jps
kill -9 [进程ID]
自动故障转移将会激活 nn1 节点,状态从 standby 转换为 active

相关文章

网友评论

      本文标题:Hadoop HA 主备手动切换

      本文链接:https://www.haomeiwen.com/subject/eghcpqtx.html