您现在的位置是:首页 >其他 >hive spark读取hive hbase外表报错分析和解决网站首页其他

hive spark读取hive hbase外表报错分析和解决

spring208208 2025-12-21 12:01:02
简介hive spark读取hive hbase外表报错分析和解决

问题现象

使用Spark shell 操作hive关联Hbase的外表导致报错;hive使用tez引擎操作关联Hbase的外表时报错。

问题1:使用tez或spark引擎,在hive查询时只要关联hbase的hive表就会有问题其他表正常。
“org.apache.hadoop.hbase.client.RetriesExhaustedException:Can’t get the locations”

问题2:spark shell读取关联hbase的hive表报错:
java.lang.ClassNotFoundException: org.apache.hadoop.hive.hbase.HBaseStorageHandler

问题分析

问题复现:
1.创建hive关联hbase表:

CREATE EXTERNAL TABLE hive_hbase(
    code int,
    name string
)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH
风语者!平时喜欢研究各种技术,目前在从事后端开发工作,热爱生活、热爱工作。