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.

HiveServer2 JDBC Connection URL for sandbox HDP 2.6

Highlighted

HiveServer2 JDBC Connection URL for sandbox HDP 2.6

New Contributor

I am trying to connect hive table(HDP 2.6) from nifi PutHiveQL processor and used below URL but getting error

Database Connection URL : jdbc:hive2://sandbox.hortonworks.com:2181/default

15808-error.png

Below is screenshot from my Ambari view of hive

15809-hive2.jpg

What should be correct URL in this case ?? Thanks

8 REPLIES 8
Highlighted

Re: HiveServer2 JDBC Connection URL for sandbox HDP 2.6

@punit

Please use below URL for JDBC connection for Hive,

jdbc:hive2://sandbox.hortonworks.com:10000/default

or

jdbc:hive2://sandbox.hortonworks.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2

Highlighted

Re: HiveServer2 JDBC Connection URL for sandbox HDP 2.6

New Contributor

Thank you so much. You have saved my final year project.

Highlighted

Re: HiveServer2 JDBC Connection URL for sandbox HDP 2.6

New Contributor

Hello,

Can you please explain how can I change the URL for JDBC connection for Hive? Is it something I can do in Ambari or I have to do it in command line?

,

Hello,

Can you explain how I can change the URL for JDBC connection for Hive? Is it possible via the GUI in Ambari?

Highlighted

Re: HiveServer2 JDBC Connection URL for sandbox HDP 2.6

New Contributor

Thank you, it also worked for me.

I was trying to connect to hive with a CLI interface (/usr/bin/hive or /usr/bin/beeline), and using the URL connexion show in the Ambari / Services / Hive / Summary interface, the connexion was refused. Using jdbc:hive2://sandbox.hortonworks.com:10000/default, it works

This JIRA page can really help: HiveServer2 Clients. It explains the Connection URL Format and explicits some default (like the default port = 1000)


Phil

72459-capture2.png

Highlighted

Re: HiveServer2 JDBC Connection URL for sandbox HDP 2.6

New Contributor

thanks @nshelke , I have tried both of them initially but was getting some error.

rightnow I am struggling to start nifi service on HDP2.6 sandbox will confirm as soon as I am able run nifi again.

Highlighted

Re: HiveServer2 JDBC Connection URL for sandbox HDP 2.6

New Contributor

jdbc:hive2://sandbox.hortonworks.com:10000/default worked atleast

Problem was I was trying to use insert into table A (Column1, Column2, Column3) values (value1, value2, value3) in puthiveQL which does not work but insert into table A values (value1, value2, value3) works

Highlighted

Re: HiveServer2 JDBC Connection URL for sandbox HDP 2.6

@punit

If your Hive JDBC problem is solved, Please accept the answer.

Highlighted

Re: HiveServer2 JDBC Connection URL for sandbox HDP 2.6

New Contributor

@nshelke

i have got an error while opening Hive

Cannot open a hive connection with connect string

jdbc:hive2://sandbox.hortonworks.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;hive.server2.proxy.user=maria_dev

can you please help me to resolve this,

,@nshelke

i got an error while opening hive

Cannot open a hive connection with connect string

jdbc:hive2://sandbox.hortonworks.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;hive.server2.proxy.user=maria_dev

can you please help me to resolve this

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