Created 07-15-2017 08:30 PM
Hi,
I know we can setup 2 HiveServer2 instances with different protocol, binary and http, for different clients. But how to enable HA in this scenario? My plan is to setup 4 HiveServer2 instances, 2 with binary and HA each other, another 2 with http HA each other. Not sure is it possible, and how to setup this?
Cheers,
Wendell
Created 07-16-2017 07:40 AM
looking at the source code
if you register 4 hiveserver2 instances (2 with binary while 2 with http mode) client can connect to any of this one hiveserver2 running with any protocol. so its not a HA between two similar protocol
Created 07-16-2017 06:09 PM
Created 07-17-2017 07:15 AM
@wbu no, to achieve HA on the same protocol, you need to register similar protocol hiveserver2 with zookeeper.
Created 07-17-2017 06:22 PM
As you mentioned that you want 4 instances of HS2, 2 in binary HA and 2 in http HA, you can can acheive that by registering similar transport protocols with the same zookeeper namespace. So, in case of the two binary HA instances, you can define the configs like this
hive.server2.zookeeper.namespace=hiveserver2-binary
and for the other two http HA instances
hive.server2.zookeeper.namespace=hiveserver2-http
Then in the connection URL JDBC clients would provide the appropriate zkNamespace
jdbc:hive2://$ZK_URL/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2-<protocol>