Support Questions

Find answers, ask questions, and share your expertise

Hive Jdbc connect to CDP public cloud

avatar
New Contributor
Hello,
I want to connect from local PC to HIVE in data engineering cluster in CDP public cloud. I'tried the following inn Java (I've "HiveJDBC41.jar" in calsspath):
 

 

 

 

 

Class.forName("com.cloudera.hive.jdbc.HS1Driver");
 conn = DriverManager.getConnection("jdbc:hive2://dataengineering-master0.cloudera.h8fb-m965.cloudera.site:10000/default"); 

 

 

 

 

 
and i get the following error:
 

 

 

 

 

Could not open client transport with JDBC Uri: jdbc:hive2://dataengineering-master0.cloudera.h8fb-m965.cloudera.site:10000/default: java.net.ConnectException: Connection timed out: connect at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:349) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) 

 

 

 

 

 
What shoud i do? Which are the connection details?
 
Thank you and best.
1 REPLY 1

avatar
Moderator

Hello @tresk ,

 

thank you for reaching out to the Community.

 

Wondering if this is the doc you were looking for:

"The JDBC connection string for connecting to a remote Hive client requires a host, port, and Hive database name. You can optionally specify a transport type and authentication."

jdbc:hive2://<host>:<port>/<dbName>;<sessionConfs>?<hiveConfs>#<hiveVars>

 

Please let us know!

 

Thank you:

Ferenc


Ferenc Erdelyi, Technical Solutions Manager

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community: