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

在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张图片

 完

你可能感兴趣的:(hive,spark)