If server to server SASL authentication is not enabled, you can replace a ZooKeeper
role without ZooKeeper service downtime.
This process is valid only if the SASL authentication is not enabled between the
ZooKeeper servers. You can check this in Cloudera Manager, if you see the
Enable Server to Server SASL Authentication under the
Configuration of ZooKeeper.
-
In Cloudera Manager, select the ZooKeeper service.
-
Click the Instances tab.
-
Select the ZooKeeper role on the old host.
-
Click the Actions for Selected button.
-
Select Stop.
-
Wait for 1 minute.
-
Click the Status tab.
-
Confirm that ZooKeeper service elected one of the remaining hosts as a
leader.
-
Click the Instances tab.
-
Click the Add Role Instances button.
-
Select the new host.
-
Click Continue.
-
Confirm the changes.
-
Click Continue.
-
Click the newly added Server instance.
-
Click the Configuration tab.
-
Find the ZooKeeper Server ID property.
-
Change its value, so that it is the highest ZooKeeper Service ID set in the
cluster.
-
Delete the old ZooKeeper role.
-
Go back to the ZooKeeper cluster.
-
Click Instances.
-
Select the old ZooKeeper role.
-
Click the Actions for Selected button.
-
Click Delete.
-
Click the Status tab.
-
Click Actions.
-
Select Start this Server.
The new ZooKeeper role is started.
-
Restart the ZooKeeper server that has an outdated configuration and is a follower.
-
Restart the leader ZooKeeper server that has an outdated configuration.
-
Confirm that a leader is elected after the restart, and the whole ZooKeeper
service is in green state.
-
Restart any dependent services, such as HBase, HDFS, YARN or Hive, that are
marked to have stale configuration.