展开
拓展 关闭
订阅号推广码
GitHub
视频
公告栏 关闭

DBeaver连接hive

  • 配置maven仓库:窗口,首选项,连接,驱动,Maven,添加
https://repo.huaweicloud.com/repository/maven/

  • 上移至第1行

  • 配置hive驱动:数据库,驱动管理器,Hadoop,Apache Hive,编辑

  • 库,添加工件

  • 填写hive-jdbc

  • 选自hive对应的版本

  • 连接hive:文件,新建,数据库连接

  • Hadoop/大数据,Apache Hive

  • 输入主机,用户名,密码

  • 右键连接,编辑连接

  • 测试连接,报错如下

Could not open client transport with JDBC Uri: jdbc:hive2://192.168.128.78:10000: java.net.ConnectException: Connection refused: connect   java.net.ConnectException: Connection refused: connect   java.net.ConnectException: Connection refused: connect     Connection refused: connect     Connection refused: connect
  • 解决方案
# 启动hiveserver2
[root@master ~]# hive --service hiveserver2
2027-12-04 21:12:33: Starting HiveServer2
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/software/apache-hive-3.1.2-bin/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/software/hadoop-3.2.1/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Hive Session ID = dd487fd8-7c34-4753-970c-32d44789759f
2027-12-04 21:12:41,647 INFO  [main] DataNucleus.Persistence: Property datanucleus.cache.level2 unknown - will be ignored
2027-12-04 21:12:44,526 WARN  [main] DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
2027-12-04 21:12:44,526 WARN  [main] DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
2027-12-04 21:12:44,527 WARN  [main] DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
2027-12-04 21:12:44,527 WARN  [main] DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
2027-12-04 21:12:44,527 WARN  [main] DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
2027-12-04 21:12:44,527 WARN  [main] DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
2027-12-04 21:12:45,723 WARN  [main] DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
2027-12-04 21:12:45,723 WARN  [main] DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
2027-12-04 21:12:45,741 WARN  [main] DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
2027-12-04 21:12:45,741 WARN  [main] DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
2027-12-04 21:12:45,741 WARN  [main] DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
2027-12-04 21:12:45,742 WARN  [main] DataNucleus.MetaData: Metadata has jdbc-type of null yet this is not valid. Ignored
2027-12-04 21:12:47,759 Log4j2-TF-2-AsyncLogger[AsyncContext@224aed64]-1 ERROR Attempted to append to non-started appender query-routing
Hive Session ID = 2b2c2b21-60a0-4fac-8fb7-525be43f8071
Hive Session ID = fdf8301a-f20f-45bd-b6c8-0c2078b6b597
Hive Session ID = 813a3688-b89b-4740-992d-d8c10f448a42
OK
OK
  • 连接成功
posted @ 2023-12-05 22:30  DogLeftover  阅读(473)  评论(0编辑  收藏  举报