Created 10-06-2015 03:47 PM
Hi,
How do you configure a Ranger Hive repository if you have two instances of HiveServer2 running in a cluster?
I'm assuming you don't create a separate repository for each one, so which jdbc URL do you provide to the repository configs? Do you perhaps have to have Zookeeper discovery enabled and then use that URL? What happens if you don't want to use the multiple HS2 instances in a failover kind of structure, but rather have them as two separate processes running at the same time? Is such a thing supported?
Thanks in advance,
Ana
EDIT: This post here has a great explanation of different JDBC URLs for ZK discovery: http://community.hortonworks.com/questions/1342/how-to-enable-zookeeper-discovery-for-hiveserver2.ht...
Created 10-06-2015 04:29 PM
You can change the JDBC URL to something like below.
jdbc:hive2://<host1:2181,host2:2181>/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
Created 10-06-2015 04:29 PM
You can change the JDBC URL to something like below.
jdbc:hive2://<host1:2181,host2:2181>/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
Created 10-06-2015 04:43 PM
That's what i figured if they set up ZK discovery - so you're saying you do have to have ZK discovery set up? There's no other way?
Created 10-22-2015 04:01 PM
JDBC URL specified in Ranger Hive repository configuration is used to provide lookup lists as the users enter database/table/column names in Ranger policy UI. In this scenario, Ranger admin acts as a Hive client to retrieve the names from HiveServer2. The JDBC URL specified should be the same as that of any other client talking to HiveServer2.
How do the users access these HiveServer2 instances, if not by ZK discovery?
Created 10-06-2015 06:37 PM
Note that when running more that one Hiveserver2 instances registered on zookeeper you also get load balancing when client uses the ZK info in JDBC url. ZooKeeper responds to client requests by randomly passing a link to one of the active HS2 instances.
Created 10-07-2015 08:17 AM
Ah! Ok, I had misunderstood that part of the HS2 HA. Thanks for clarifying!