1、问题示例

使用hive直接选择查看表中数据报错,而相同语句在spark-sql却不报错。

实在无力吐槽hive了,因它受伤太多了。

(1)使用hive

hive (test)> select * from t1;
FAILED: LockException [Error 10280]: Error communicating with the metastore
hive (test)> select * from t2;
FAILED: LockException [Error 10280]: Error communicating with the metastore
hive (test)> select * from t3;
FAILED: LockException [Error 10280]: Error communicating with the metastore
hive (test)> select * from t_orcfile;
FAILED: LockException [Error 10280]: Error communicating with the metastore
hive (test)> select * from t_textfile;
FAILED: LockException [Error 10280]: Error communicating with the metastore
hive (test)> select * from t_sequencefile;
FAILED: LockException [Error 10280]: Error communicating with the metastore

(2)使用spark-sql

spark-sql> select * from t1;
1 aaa
2 bbb
Time taken: 0.234 seconds, Fetched 2 row(s)
spark-sql> select * from t2;
Time taken: 0.086 seconds
spark-sql> select * from t3;
1 aaa
Time taken: 0.135 seconds, Fetched 1 row(s)
spark-sql> select * from t_orcfile;
a1 1 b1 c1
a2 2 b2 c2
a3 3 b3 c3
a4 4 b4 c4
a5 5 b5 c5
Time taken: 0.255 seconds, Fetched 5 row(s)
spark-sql> select * from t_textfile;
a1 3 b3 c3
a4 4 b4 c4
a1 1 b1 c1
a2 2 b2 c2
Time taken: 0.211 seconds, Fetched 4 row(s)
spark-sql> select * from t_sequencefile;
a1 1 b1 c1
a2 2 b2 c2
Time taken: 1.673 seconds, Fetched 2 row(s)

 

2、解决方案

尚未解决,确信hive-site.xml没有问题。

3、问题剖析

尚未知晓。

posted on 2021-10-29 13:59  LankeHome  阅读(519)  评论(0编辑  收藏  举报