DbVisualizer 連線 hive 資料庫
如果表多,欄位多,通過命令列檢視就不方便了。連hive推薦使用,DbVisualizer配置還是挺簡單的。
1,配置/bigdata/hive/conf/hive-site.xml
<property> <name>hive.server2.thrift.http.port</name> <value>10000</value> </property> <property> <name>hive.server2.thrift.bind.host</name> <value>10.0.0.237</value> </property>
新增以上內容,
2,啟動hiveserver2
# hiveserver2 # netstat -tpnl |grep 1000 tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 12419/java tcp 0 0 0.0.0.0:10002 0.0.0.0:* LISTEN 12419/java
如果10000埠起來了,說明hiveserver2啟動成功了。
3,配置hdfs許可權
# vim /bigdata/hadoop/etc/hadoop/core-site.xml //新增以下內容 <property> <name>hadoop.proxyuser.root.hosts</name> <value>*</value> </property> <property> <name>hadoop.proxyuser.root.groups</name> <value>*</value> </property>
重啟hdfs,如果這步不做,會報以下錯誤:
An error occurred while establishing the connection:
Long Message:
Could not establish connection to jdbc:hive2://10.0.0.237:10000/tanktest: Required field 'serverProtocolVersion' is unset! Struct:TOpenSessionResp(status:TStatus(statusCode:ERROR_STATUS, infoMessages:[*org.apache.hive.service.cli.HiveSQLException:Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException):
User: root is not allowed to impersonate anonymous:14:13, org.apache.hive.service.cli.session.SessionManager:createSession:SessionManager.java:419,
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。省略。。。。。。。。。。。。。。。。。。。。。。。。。。。。
4,下載安裝DbVisualizer,網上很多就不說了
5,下載hive-jdbc-uber-2.4.0.0-169.jar,DbVisualizer的hive外掛
地址:https://pan.baidu.com/s/1BrkVutp9mF5F5PNlBvnnFA 密碼:5r1d
6,DbVisualizer配置
6.1,DbVisualizer=》tools=》tools properties=》general

DbVisualizer genera配置
-Dsun.security.krb5.debug=true
-Djavax.security.auth.useSubjectCredsOnly=false
6.2,DbVisualizer=》tools=》tools manager=》hive

DbVisualizer driver manager配置
6.3,新增連線

DbVisualizer新增連線
6.4,資料檢視

DbVisualizer 資料檢視