如何解决无法从 hbase 提供 hive 中的表
在 HDP 3.1.x 上,我使用 STORED BY org.apache.hadoop.hive.hbase.HBaseStorageHandler
选项创建了一个链接到 Hbase 的表。
执行选择时,它工作正常。
当我尝试从中填充表格时,它因错误而崩溃
create table test as select * from hbase_xxx;
INFO : Completed executing command(queryId=hive_20210205161427_a49ca7bc-0637-4c19-9a62-6657376373a1); Time taken: 74.951 seconds
Error: Error while processing statement: FAILED: Execution Error,return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask.
Vertex failed,vertexName=Map 1,vertexId=vertex_1611574680060_3923_1_00,diagnostics=[Vertex vertex_1611574680060_3923_1_00 [Map 1] killed/failed due to:ROOT_INPUT_INIT_FAILURE,Vertex Input: raw_eff_ann_ent initializer failed,vertex=vertex_1611574680060_3923_1_00 [Map 1],org.apache.hadoop.hbase.client.RetriesExhaustedException: Can't get the location for replica 0
当查看 YARN 日志时,它似乎尝试从带有 localhost:2181
的数据节点连接到 zookeeper ...但失败了
2021-02-05 11:22:41,921 [WARN] [ReadOnlyZKClient-localhost:2181@0x48730f2c] |zookeeper.ReadOnlyZKClient|: 0x48730f2c to localhost:2181 failed for get of /hbase/hbaseid,code = CONNECTIONLOSS,retries = 1
选择相同的日志显示zookeeper_quorum连接字符串到zookeeper并成功
有什么想法吗?
解决方法
我从支持中得到了回报;你必须强制 hbase-site.xml 进入 hive env 的模板 这就是解决方案
Add the below:
export HIVE_AUX_JARS_PATH=${HIVE_AUX_JARS_PATH}:/etc/hbase/conf/hbase-site.xml
to your Advanced hive-env->hive-env template,before this statement export METASTORE_PORT={{hive_metastore_port}}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。