出现以下错误:
org.apache.haddop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category READ is not supported in state standby:
解决办法:
hdfs写的那台机器是待机状态的,所以不支持,要在active 机器中写才行。
切换namenode 必须用主机node1操作 重启hadoop之后需要重新 转换node3为active
hdfs haadmin -transitionToActive --forcemanual nn3
查看namenode状态
[root@hadoop01 ~]# hdfs haadmin -getServiceState nn1 active [root@hadoop01 ~]# hdfs haadmin -getServiceState nn2 standby [root@hadoop01 ~]#