Hive on Spark 查询Hive映射HBase的表报错

发布时间:2022-11-13 14:00

在Hue中执行如下查询

set spark.yarn.queue=xxx;

set hive.execution.engine=spark;

select count(1) from xxx_dw.dw_xxx;

Hue报错如下

Caused by: java.lang.ClassNotFoundException: Class org.apache.hadoop.hbase.client.ClusterStatusListener$MulticastListener not found

at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2409) ~[hadoop-common-3.0.0-cdh6.3.1.jar:?]

at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2503) ~[hadoop-common-3.0.0-cdh6.3.1.jar:?]

at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2529) ~[hadoop-common-3.0.0-cdh6.3.1.jar:?]

at org.apache.hadoop.hbase.client.ConnectionImplementation.(ConnectionImplementation.java:277) ~[hbase-client-2.1.0-cdh6.3.1.jar:?]

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_181]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_181]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_181]

at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_181]

at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:220) ~[hbase-client-2.1.0-cdh6.3.1.jar:?]

... 26 more

解决方法:

CM Spark中配置HBase服务,重启即可。

Hive on Spark 查询Hive映射HBase的表报错_第1张图片

 完

ItVuer - 免责声明 - 关于我们 - 联系我们

本网站信息来源于互联网,如有侵权请联系:561261067@qq.com

桂ICP备16001015号