具有高可用性的 Namenode 与基于 zookeeper 的领导者选择

Namenode with high availability vs zookeeper based leader selection

我正在阅读 Apache Hadoop 文档和 cloudera 文档中的 2 个不同内容。
基于cloudera,我们应该在高可用性模式下设置namenode,即:通过定义primary和secondary namenode,但是根据Hadoop documentation,这应该由zookeeper自动处理,它应该在可用的datanodes中决定namenode。

谁能解释一下区别和使用哪一个?

by defining primary and secondary namenode

有"secondary namenode"这样的东西,但它实际上是一个非常不同的东西,因为它不是备用的,而且可以变成活动的。

没有 "vs"。 Namenode HA 需要 Zookeeper

如果您阅读更多 Cloudera documentation 它不会忘记提到 Zookeeper。

Automatic failover adds two new components to an HDFS deployment: a ZooKeeper quorum, and the ZKFailoverController process (abbreviated as ZKFC).

Cloudera 没有在核心 Hadoop 功能之上打包太多额外功能(如果有的话)。

关于您的问题...

this should automatically taken care by zookeeper

如果(手动)配置了 HDFS Zookeeper 属性,则故障转移是自动的,Zookeeper 是 运行,并且 Active Namenode 关闭。

among the available datanodes

操作与datanodes无关