Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Configure HA database for Hive Metastore

avatar
Contributor

We have an MYSQL HA cluster,

In case of failover, for the secondary master to take the place of the failed master, the hive metastore connection string configuration would need to be changed to point to the new master, and the services restarted. is it possible to have true HA on the Hive Metastore without changing the connection string manually ?

 

1 ACCEPTED SOLUTION

avatar
Guru

@KPG1 I can think of Oracle database ha a feature i.e Oracle RAC,where we give SCAN  address as the jdbc string to metastore,so the scan ip wll take care of loadbalancing.

 

You need to check with mysql vendor(Oracle),if they have similar thing as of Oracle database.

 

You can have HMS HA but all the HMS instance point to same database, you can not have 2 HMS instance pointing to a different database.

 

Please let me know,if you have any querties and please "Accept As Solution", if your queries are answered

View solution in original post

2 REPLIES 2

avatar
Rising Star

Hello,

did you tried to use a Loadbalancer like HAproxy?

I'm using Postgresql as HA internal database but for sure you can setup with both connections.

something like this:

frontend hive
bind *:10000
mode tcp
option tcplog
timeout client 50000
default_backend hive_backend

backend hive_backend
mode tcp
balance source
timeout connect 5000
timeout server 50000
server hiveserver1 Master1:10000
server hiveserver2 Master2:10000

avatar
Guru

@KPG1 I can think of Oracle database ha a feature i.e Oracle RAC,where we give SCAN  address as the jdbc string to metastore,so the scan ip wll take care of loadbalancing.

 

You need to check with mysql vendor(Oracle),if they have similar thing as of Oracle database.

 

You can have HMS HA but all the HMS instance point to same database, you can not have 2 HMS instance pointing to a different database.

 

Please let me know,if you have any querties and please "Accept As Solution", if your queries are answered