Replace a ZooKeeper role on an unmanaged cluster

You can replace a ZooKeeper Role on an unmanaged cluster, using command line.

These instructions assume you are using ZooKeeper from the command line.

  1. Stop the ZooKeeper role on the old host.
  2. Confirm the ZooKeeper Quorum elected a leader.
  3. Add a new ZooKeeper role on the new server.
  4. Identify the dataDir locatiom from the zoo.cfg file.
    This default to /var/lib/zookeeper.
  5. Identify the ID number for the ZooKeeper Server from the myid file in the configuration: cat/var/lib/zookeeper/myid.
  6. On all the ZooKeeper hosts, edit the zoo.cfg file, so the server ID references the new server hostname.
    For example:
  7. Restart the ZooKeeper hosts.
  8. Confirm the ZooKeeper Quorum elected a leader and the other hosts are followers.
  9. Restart any dependent services, such as HBase, HDFS Failover Controllers with HDFS High Availability, or YARN with High Availability.
  10. Perform a failover to make on HDFS NameNode active.