【发布时间】:2018-10-17 11:28:50
【问题描述】:
错误:
原因:org.apache.thrift.transport.TTransportException:不能 创建 http 连接到 jdbc:hive2://xxxxxxxxxx.azurehdinsight.net:443/default;transportMode=http;ssl=true;httpPath=/hive2。 HTTP 响应码:403
代码:
public static void main(String[] args) throws SQLException {
Class.forName("org.apache.hive.jdbc.HiveDriver");
Connection con = DriverManager.getConnection("jdbc:hive2://xxxxx.azurehdinsight.net:443/default;transportMode=http;ssl=true;httpPath=/hive2", "xxx", "xxx");
Statement stmt = con.createStatement();
...
}
我的 Hive 版本:1.2.1.2.5
我的 pom 文件:
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>1.2.0</version>
<classifier>standalone</classifier>
</dependency>
【问题讨论】:
-
检查您的集群用户访问权限