Adding a ZooKeeper Role
Describes how to add a ZooKeeper role to a Data Fabric node by using the CLI.
About this task
Procedure
- Install the ZooKeeper package corresponding to the new role. For more information about packages, see Data Fabric Repositories and Packages.
-
To identify the ZooKeeper nodes in the cluster, run
maprcli node listzookeepers
. -
Copy the tokens and all other directories needed from the existing nodes. You
can find the list of files you need to copy in Enabling Security.
IMPORTANT Copying files as
root
user results in the files being unreadable. Make sure the copied files are readable as the cluster admin user. -
On all nodes in the cluster where you added the new ZooKeeper role, run configure.sh with the following options:
-Z
: This option specifies the list of ZooKeeper nodes.-R
: This option uses all previously set configurations.
/opt/mapr/server/configure.sh -Z <all-nodes-including-new-one> -R
-
Restart the servies on all nodes:
- Run the following command on all nodes to start or restart
ZooKeeper:
systemctl restart mapr-zookeeper
- Perform a rolling restart of ZooKeeper on all nodes. A rolling restart of ZooKeeper means restart ZooKeeper on each node, one at a time, pausing until the last restart finishes before beginning the next. Restart the ZooKeeper leader last.
- Run the following command to verify that the new node joined the
ZooKeeper
quorum:
/opt/mapr/initscripts/zookeeper qstatus
- Perform a rolling restart of Warden on all nodes. Warden picks up the
new ZooKeeper node. Issue the following command on all nodes to restart
Warden:
systemctl restart mapr-warden
- Run the following command on all nodes to start or restart
ZooKeeper:
-
Run
maprcli node listzookeepers
. The output should show all ZooKeeper nodes, including the node where the role was added.