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.
-
Run
configure.sh -Z
on the node where you added the new ZooKeeper role. Using the-Z
option provides the list of ZooKeeper nodes that includes the new node. -
Run the
sudo /opt/mapr/server/configure.sh -C
command to figure out the CLDB nodes in the cluster. For example,as shown in the output below, node2 and node3 are CLDB nodes, and node2, node3 and node4 are ZooKeeper nodes.$ sudo /opt/mapr/server/configure.sh -C -Z ln: target '/opt/mapr/hadoop/hadoop-2.7.4/share/hadoop/common/lib/' is not a directory: No such file or directory CLDB node list: node2.cluster.com:7222,node3.cluster.com:7222 Zookeeper node list: node2.cluster.com:5181,node3.cluster.com:5181,node4.cluster.com:5181 External Zookeeper node list: Node setup configuration: cldb fileserver hadoop-client hadoop-util nodemanager spark zookeeper Log can be found at: /opt/mapr/logs/configure.log
-
Copy
/opt/mapr/conf/cldb.key
from CLDB node to the Zookeeper node even if CLDB is not installed or running on this node. The/opt/mapr/conf/cldb.key
from CLDB node must be copied to every ZooKeeper node in the cluster, irrespective of whether or not CLDB is not installed on or running on the individual ZooKeeper nodes. -
Run the following command to start or restart ZooKeeper on the node where you
added the ZooKeeper role:
% service mapr-zookeeper restart
-
Perform a rolling restart of ZooKeeper on all other ZooKeeper 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:
% service mapr-zookeeper qstatus
-
Perform a rolling restart of Warden on all other nodes.
Warden picks up the new ZooKeeper node. Issue the following command to restart Warden on the node where you installed the role:
% service mapr-warden restart