hive 元数据库mysql 执行二个hive客户端, 就报错SessionHiveMetaStoreClient

环境 -> 元数据库:mysql

执行hive命令, 第一个客户端正常, 第二个客户端就报错如下:

[root@fdc07 ~]# hive

Logging initialized using configuration in file:/opt/cloudera/parcels/CDH-5.16.2-1.cdh5.16.2.p0.8/etc/hive/conf.dist/hive-log4j.properties

WARNING: Hive CLI is deprecated and migration to Beeline is recommended.

hive> show tables;

FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

 

解决方案: 

使用beeline

连接命令: /opt/cloudera/parcels/CDH/bin/beeline -u "jdbc:hive2://fdc07:10000"

[root@fdc07 test]# /opt/cloudera/parcels/CDH/bin/beeline -u "jdbc:hive2://fdc07:10000"
scan complete in 1ms
Connecting to jdbc:hive2://fdc07:10000
Connected to: Apache Hive (version 1.1.0-cdh5.16.2)
Driver: Hive JDBC (version 1.1.0-cdh5.16.2)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 1.1.0-cdh5.16.2 by Apache Hive
0: jdbc:hive2://fdc07:10000> show tables;
INFO  : Compiling command(queryId=hive_20201221164242_e40955c7-c5d1-4fd2-83a4-7dc1ccf882a8): show tables
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:tab_name, type:string, comment:from deserializer)], properties:null)
INFO  : Completed compiling command(queryId=hive_20201221164242_e40955c7-c5d1-4fd2-83a4-7dc1ccf882a8); Time taken: 0.014 seconds
INFO  : Executing command(queryId=hive_20201221164242_e40955c7-c5d1-4fd2-83a4-7dc1ccf882a8): show tables
INFO  : Starting task [Stage-0:DDL] in serial mode
INFO  : Completed executing command(queryId=hive_20201221164242_e40955c7-c5d1-4fd2-83a4-7dc1ccf882a8); Time taken: 0.018 seconds
INFO  : OK
+---------------------+--+
|      tab_name       |
+---------------------+--+
| alarm_report_data   |
| report_fdc_day      |
| report_fdc_month    |
| report_fdc_quarter  |
| report_fdc_week     |
| report_fdc_year     |
+---------------------+--+
6 rows selected (0.107 seconds)
0: jdbc:hive2://fdc07:10000> !exit
Closing: 0: jdbc:hive2://fdc07:10000
You have new mail in /var/spool/mail/root
[root@fdc07 test]#

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

千里风雪

你的鼓励是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值