DBSchema 连接Hive2

前提条件: 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

需要在
[[email protected] 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
[[email protected] 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 这个即可

DBSchema 连接Hive2

DBSchema 连接Hive2

DBSchema 连接Hive2

至此,测试成功.