我正在尝试为我的直线设置别名。并面临一个问题。
如果我登录到beeline
,然后提供以下连接字符串,它将起作用。它要求我输入用户名和密码,并且我能够登录。
!connect jdbc:hive2://<my_domain>:8449/;ssl=true;transportMode=http;httpPath=gateway/emr-cluster-top/hive;sslTrustStore=/etc/pki/ca-trust/extracted/java/cacerts;trustStorePassword=changeit
但是,如果我运行以下命令,它将无法正常工作。不知道我在做什么错。
beeline -u jdbc:hive2://<my_domain>:8449/;ssl=true;transportMode=http;httpPath=gateway/emr-cluster-top/hive;sslTrustStore=/etc/pki/ca-trust/extracted/java/cacerts;trustStorePassword=changeit -n my_user -=p my_pass
错误
Caused by: java.sql.SQLException: Could not establish connection to jdbc:hive2://<my_domain>:8449/;ssl=true;transportMode=http;httpPath=gateway/emr-cluster-top/hive;sslTrustStore=/etc/pki/ca-trust/extracted/java/cacerts;trustStorePassword=changeit: HTTP Response code: 401
at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:699)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:200)
... 25 more
Caused by: org.apache.thrift.transport.TTransportException: HTTP Response code: 401
at org.apache.thrift.transport.THttpClient.flushUsingHttpClient(THttpClient.java:262)
at org.apache.thrift.transport.THttpClient.flush(THttpClient.java:313)
at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:73)
at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:62)
at org.apache.hive.service.rpc.thrift.TCLIService$Client.send_OpenSession(TCLIService.java:162)
at org.apache.hive.service.rpc.thrift.TCLIService$Client.OpenSession(TCLIService.java:154)