Namenode 开启HA之后,由于zookeeper异常,出现脑裂现象
执行
$./hdfs haadmin -getServiceState nn1
standby
$./hdfs haadmin -getServiceState nn2
standby
两个互为HA的namenode节点均处于standby 状态,随后执行
$/hdfs haadmin -transitionToActive --forcemanual nn1
强行手工将namenode1状态转换为active
PS: serverID即namenodeID,可以访问http://namenodeip:50070界面查看