Support Questions

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

Will Zookeeper select the stopped hiveserver2?

avatar
Explorer

I have a node where I have installed hiveserver2. I have to stop the running hiveserver2 on that node, if I just stop the hiveserver2. It still shows up in the zookeeper if I do ls /hiverserver ... So zookeeper will still select that hiveserver even though its stopped? As I know zookeeper will select randomly registered hive server2.

Also If I want to install the hiverserver2 again.. I should just install it from Ambari right? is there any other steps need to follow to install hiveserver2?

1 ACCEPTED SOLUTION

avatar
Super Guru

@Madhura Mhatre,

When you start HiveServer2 , it will create a znode under /hiveserver2 with the below format

serverUri=hiveserver2host:10000;version=3.1.0.3.0.1.0-187;sequence=0000000000

.

After hiveserver2 is stopped, it will delete this znode but not the parent /hiveserver znode. If you want to install the hiveserver2 again, you can do it again from Ambari.

.

Please "Accept" the answer if this helps 🙂

View solution in original post

3 REPLIES 3

avatar
Super Guru

@Madhura Mhatre,

When you start HiveServer2 , it will create a znode under /hiveserver2 with the below format

serverUri=hiveserver2host:10000;version=3.1.0.3.0.1.0-187;sequence=0000000000

.

After hiveserver2 is stopped, it will delete this znode but not the parent /hiveserver znode. If you want to install the hiveserver2 again, you can do it again from Ambari.

.

Please "Accept" the answer if this helps 🙂

avatar
Explorer

Hi @Aditya Sirna, I have some followup questions.

1. I have multple hiveserver, so thats why I want to stop one.. but if I stop it I still see the znode. So I am not sure if Zookeeper will select this hiveserver2 randomly. Do I need to delete this hiveserver2 after stopping so it will get deleted from the znode?

2. For hiveserver2 to install is there any steps need to follow?

Thanks.

avatar
Super Guru

@Madhura Mhatre,

1) If you have multiple hiveservers, you will have multiple znodes(of the above mentioned forma) under /hiveserver2. When you stop the hiveserver2, respective znode will be deleted from zookeeper. If you stop all the hiveserver instances, then /hiveserver2 will have no znodes under it. You should not delete /hiveserver2 . hiveserver2 is the parent znode , respective hiveserver znodes will be under the parent znode ie /hiveserver2.

2) By installing do you mean you want to add another hiveserver2 to the cluster. If yes, then follow the below doc link

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_hadoop-high-availability/content/additio....