在執行 hive 命令時,報錯信息如下
Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category READ is not supported in state standby
初步判斷是由於HA節點中處於standby狀態造成的異常
執行
$./hdfs haadmin -getServiceState namenode1
standby
$./hdfs haadmin -getServiceState namenode2
standby
兩個互為HA的namenode節點均處於standby 狀態,隨后執行
$/hdfs haadmin -transitionToActive --forcemanual namenode1
強行手工將namenode1狀態轉換為active
執行 hive,工作正常,故障解決