This diagram of automatic failover shows the following relationships:

Two failover controllers talk to the ZooKeeper. Each failover controller talks to a NameNode. One NameNode is in active mode, and one NameNode is in hot standby mode.

The NameNodes talk to the three JournalNodes and three DataNodes.

The standby NameNode checkpoints the active NameNode.