DBSchema 连接Hive2

本文详细介绍了如何解决Hive JDBC连接问题,包括配置Hadoop代理用户、重启Hadoop服务、手动编译并上传hive-jdbc驱动至DBschema的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

前提条件: 1.hadoop 集群运行正常
2. hive 安装正常
3. 启动了hive2 服务,默认端口是10000

User: hadoop is not allowed to impersonate hive, serverProtocolVersion:null
could not establish connection to jdbc://hive2:// serverProtocolVersion is unset

需要在
[hadoop@hadoop-namenode1 hadoop]$ pwd ;ls
/var/server/hadoop/etc/hadoop
capacity-scheduler.xml hadoop-env.sh httpfs-site.xml mapred-queues.xml.template yarn-env.cmd
configuration.xsl hadoop-metrics2.properties kms-acls.xml mapred-site.xml yarn-env.sh
container-executor.cfg hadoop-policy.xml kms-env.sh shellprofile.d yarnservice-log4j.properties
core-site.xml hadoop-user-functions.sh.example kms-log4j.properties slaves yarn-site.xml
core-site.xml_bk hdfs-site.xml kms-site.xml ssl-client.xml.example
datanode-hosts httpfs-env.sh log4j.properties ssl-server.xml.example
datanode-hosts-exclude httpfs-log4j.properties mapred-env.cmd user_ec_policies.xml.template
hadoop-env.cmd httpfs-signature.secret mapred-env.sh workers
[hadoop@hadoop-namenode1 hadoop]$

修改添加一下记录.

hadoop.proxyuser.hadoop.hosts * hadoop.proxyuser.hadoop.groups *

重新启动hadoop

打开DBschema 如果没有hive 驱动,DBschema 会自动下载,或者你也可手动上传一个。
我就是手动上传的,因为DBschema 下载太慢了。

git clone https://github.com/timveil/hive-jdbc-uber-jar.git
cd hive-jdbc-uber-jar/
mvn compile
mvn package
ls target

happy:target happy$ ls -al
total 38144
drwxrwxrwx 1 happy staff 131072 11 13 00:42 .
drwxrwxrwx 1 happy staff 131072 11 13 00:27 …
drwxrwxrwx 1 happy staff 131072 11 13 00:42 classes
drwxrwxrwx 1 happy staff 131072 11 13 00:42 generated-sources
-rwxrwxrwx 1 happy staff 18522021 11 13 00:56 hive-jdbc-uber-2.6.5.0-292.jar
drwxrwxrwx 1 happy staff 131072 11 13 00:56 maven-archiver
drwxrwxrwx 1 happy staff 131072 11 13 00:42 maven-status
-rwxrwxrwx 1 happy staff 5902 11 13 00:56 original-hive-jdbc-uber-2.6.5.0-292.jar

open .

上传 hive-jdbc-uber-2.6.5.0-292.jar 这个即可

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

至此,测试成功.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

开心自由天使

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

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

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

打赏作者

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

抵扣说明:

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

余额充值