今天测试HDFS群集active和standby切换,过程中出现了两个standby模式,运行hadoop命令出现如下报错,
15/05/18 16:31:12 INFO retry.RetryInvocationHandler: Exception while invoking getFileInfo of class ClientNamenodeProtocolTranslatorPB over Master1/192.168.19.194:9000 after 13 fail over attempts. Trying to fail over after sleeping for 14300ms.
org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category READ is not supported in state standby
意思是standby模式不能提供写入,使用如下命令解决:
hdfs haadmin -transitionToActive --forcemanual Master1
让Master1变更为active模式。
15/05/18 16:31:12 INFO retry.RetryInvocationHandler: Exception while invoking getFileInfo of class ClientNamenodeProtocolTranslatorPB over Master1/192.168.19.194:9000 after 13 fail over attempts. Trying to fail over after sleeping for 14300ms.
org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category READ is not supported in state standby
意思是standby模式不能提供写入,使用如下命令解决:
hdfs haadmin -transitionToActive --forcemanual Master1
让Master1变更为active模式。