- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Connect hive with zookeeper in java
- Labels:
-
Apache Hive
Created ‎03-23-2017 08:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
String url = "jdbc:hive2://huge-agent02:10000/";
Class.forName(driverName);
conn =(Connection) DriverManager.getConnection(url, "hive", "hive");
when i replace url to zookeeper url (jdbc:hive2://huge-server:2181,huge-agent02:2181,huge-agent01:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2), it can not connected hive,why?
Created ‎03-23-2017 10:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you passing the driverName as "org.apache.hive.jdbc.HiveDriver" ?
Also when you say with the mentioned url it can not connect .... does it mean that you are getting any error? Or is it getting hung for a long time?
Are the host names resolvable from the host where you are running the code?
Example: (from Client machine)
# telnet huge-server 2181 # telnet huge-agent02 2181 # telnet huge-agent01 2181
.
Created ‎08-03-2017 09:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Jay SenSharma, can you tell the exact version where this issue was fixed i am currently using 2.4.0.0-169, when if i use 1.2.1000.2.5.0.0-1245, i am getting other errors like hiveserver2 not starting or some zookeeper error. is this https://issues.apache.org/jira/browse/HIVE-11581

- « Previous
-
- 1
- 2
- Next »