官术网_书友最值得收藏!

  • Learning Hadoop 2
  • Garry Turkington Gabriele Modena
  • 207字
  • 2021-07-23 20:57:40

Automatic NameNode failover

Now that we have introduced ZooKeeper, we can show how it is used to enable automatic NameNode failover.

Automatic NameNode failover introduces two new components to the system, a ZooKeeper quorum, and the ZooKeeper Failover Controller (ZKFC), which runs on each NameNode host. The ZKFC creates an ephemeral ZNode in ZooKeeper and holds this ZNode for as long as it detects the local NameNode to be alive and functioning correctly. It determines this by continuously sending simple health-check requests to the NameNode, and if the NameNode fails to respond correctly over a short period of time the ZKFC will assume the NameNode has failed. If a NameNode machine crashes or otherwise fails, the ZKFC session in ZooKeeper will be closed and the ephemeral ZNode will also be automatically removed.

The ZKFC processes are also monitoring the ZNodes of the other NameNodes in the cluster. If the ZKFC on the standby NameNode host sees the existing master ZNode disappear, it will assume the master has failed and will attempt a failover. It does this by trying to acquire the lock for the NameNode (through the protocol described in the ZooKeeper section) and if successful will initiate a failover through the same fencing/promotion mechanism described earlier.

主站蜘蛛池模板: 宁津县| 阳西县| 鄂托克旗| 雷波县| 尉犁县| 井陉县| 泗阳县| 凤阳县| 德州市| 巩义市| 祁门县| 田阳县| 潜江市| 大安市| 肇源县| 无极县| 清镇市| 黄石市| 婺源县| 台中县| 鹰潭市| 鹿泉市| 沂南县| 新平| 潍坊市| 米泉市| 兴国县| 旬阳县| 高唐县| 中卫市| 义乌市| 营山县| 绥滨县| 察隅县| 东源县| 大安市| 塔河县| 仁化县| 阿克苏市| 鸡西市| 睢宁县|