【发布时间】:2019-06-28 02:17:51
【问题描述】:
我尝试使用 Hive 和 Zeppelin 请求 Hive 数据库,但出现此错误:
SemanticException Unable to fetch table table_name. org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category READ is not supported in state standby
我得到 2 个名称节点:A 和 B 当 A 处于活动状态且 B 处于待机状态时,我可以毫无问题地请求我的桌子。
hdfs haadmin -getServiceState A
active
hdfs haadmin -getServiceState B
standby
如果我切换两种状态:
hdfs haadmin -failover A B
A 处于待机状态,B 现在处于活动状态
hdfs haadmin -getServiceState A
standby
hdfs haadmin -getServiceState B
active
现在我的请求不起作用并收到错误:
SemanticException Unable to fetch table table_name. org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category READ is not supported in state standby
我的 Hive 为 HA 配置得很好:
hive --config /etc/hive/conf/conf.server --service metatool -listFSRoot
Listing FS Roots..
hdfs://HA-NAME/apps/hive/warehouse
hdfs://HA-NAME/apps/hive/warehouse/table1.db
hdfs://HA-NAME/apps/hive/warehouse/table2.db
...
但是在 Hive 中使用命令:show create table1,我得到:
LOCATION ' hdfs://A/data/.... '
问题接缝来自namenode B,或者Hive始终使用namenode A作为活动namenode,即使它处于备用状态。
我使用 HA 名称将我的 kafka 连接到 HDFS 也没有问题。
【问题讨论】:
标签: hadoop hive apache-zeppelin high-availability