'What will a HRegionServer do if the zookeeper node that connected to the HRegionServer goes down?

In HBase, when a HRegionServer starts up, it will create an ephemeral znode in the ZooKeeper cluster. When the HRegionServer crashes, the ephemeral znode will be deleted, and the HMaster can be notified about the crash of the HRegionServer.

As I known, ZooKeeper will clean up ephemeral znodes for the closed sessions. For example, a client C connects with a ZooKeeper node ZK1 and creates an ephmeral znode "/eph". When client C crashes or ZK1 crashes, the ephmeral znode "/eph" will be deleted after a while.

So, I'm curious about what will a HRegionServer do if the zookeeper node that connected to the HRegionServer goes down. Will the HRegionServer recreate the ephemeral znode? Will the HMaster be notified about the deletion of the HRegionServer's ephemeral znode? Will the HMaster start the server shutdown handling process?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source