我一直在尝试通过Knox从Teradata Studio Express 15.10连接我的HDP群集(2.1),但无法成功。我正确提供的所有配置,即JDBC主机名,端口,用户/密码,WebHCat主机,端口。如果我从beeline shell进行测试,则JDBC连接可以正常工作。
beeline> !connect jdbc:hive2://xx.xx.xxx.xxx:10000
scan complete in 11ms
Connecting to jdbc:hive2://xx.xx.xxx.xxx:10000
Enter username for jdbc:hive2://xx.xx.xxx.xxx:10000: hive
Enter password for jdbc:hive2://xx.xx.xxx.xxx:10000: ****
Connected to: Apache Hive (version 0.13.0.2.1.2.2-516)
Driver: Hive JDBC (version 0.13.0.2.1.2.2-516)
Transaction isolation: TRANSACTION_REPEATABLE_READ
但是我没有发现我对WebHCat用户名的信念。不知道HDP的默认值是什么或如何定义一个新值。自定义
webhcat-site.xml
属性"webhcat.proxyuser.hue.groups"
和"webhcat.proxyuser.hue.hosts"
在这里对我没有帮助。当我尝试从Teradata Studio Express GUI进行连接时,出现以下错误:
java.lang.Exception: Could not establish connection to jdbc:hive2://xx.xx.xxx.xxx:10000/default?hive.server2.transport.mode=http;hive.server2.thrift.http.path=cliservice: org.apache.http.conn.HttpHostConnectException: Connection to http://xx.xx.xxx.xxx:10000 refused
at com.teradata.datatools.hadoop.hive.connectivity.HiveConnection.openJdbcConnection(HiveConnection.java:286)
at com.teradata.datatools.hadoop.hive.connectivity.HiveConnection.createConnection(HiveConnection.java:199)
at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:105)
at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)
at com.teradata.datatools.hadoop.hive.connectivity.HiveConnection.open(HiveConnection.java:144)
at com.teradata.datatools.hadoop.hive.connectivity.HivePingFactory.createJdbcConnection(HivePingFactory.java:44)
at com.teradata.datatools.hadoop.hive.connectivity.PingJdbcJob.createTestConnection(PingJdbcJob.java:30)
at com.teradata.datatools.hadoop.hive.connectivity.PingJob.run(PingJob.java:42)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
有人对这里发生的事情有任何想法吗?任何指针将不胜感激。
最佳答案
这个问题解决了。
在TD Studio Express 15.10中需要注意几个配置:
对于JDBC:
Hostname, Port Number (10000 or 10001 or any other on which the hive service is listening), JDBC User Name, JDBC Password & uncheck "HTTP Transport Mode" from the options list in the tool.
对于WebHCat:
WebHCat Hostname, Port Number(50111 or the one on which HCat is listening) & WebHCat User Name (hue)
最后,防火墙配置应确保不会阻塞HCat端口。
关于hadoop - 从Teradata Studio Express 15.10连接HDP,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/35389577/