Hadoop集群hdfs 手动主备切换
hdfs-site.xml配置:
<property>
<name>dfs.nameservices</name>
<value>nameservice1</value>
</property>
<property>
<name>dfs.ha.namenodes.nameservice1</name>
<value>namenode166,namenode164</value>
</property>
(1) 查看节点状态:
hdfs haadmin -getServiceState namenode166
hdfs haadmin -transitionToStandby --forcemanual namenode166
(3) 将 namenode164 切换为 Active 备用节点
hdfs haadmin -transitionToActive --forcemanual namenode164