Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hive Jdbc connect to CDP public cloud

Highlighted

Hive Jdbc connect to CDP public cloud

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

Re: Hive Jdbc connect to CDP public cloud

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:

Don't have an account?
Coming from Hortonworks? Activate your account here