ZooKeeper is a distributed and highly available coordination service. This topic describes how to view the component information of ZooKeeper in the E-MapReduce (EMR) console and how to connect to ZooKeeper.

Prerequisites

An EMR cluster is created, and ZooKeeper is selected from the optional services during the cluster creation. For more information about how to create an EMR cluster, see Create a cluster.
Note You do not need to select the ZooKeeper service for a high-availability cluster because the service is deployed by default.

For more information about ZooKeeper, see ZooKeeper Getting Started Guide.

View the component information of ZooKeeper

  1. Log on to the Alibaba Cloud EMR console.
  2. In the top navigation bar, select the region where your cluster resides and select a resource group based on your business requirements.
  3. Click the Cluster Management tab.
  4. On the Cluster Management page, find your cluster and click Details in the Actions column.
  5. In the left-side navigation pane, choose Cluster Service > ZooKeeper.
  6. Click the Component Deployment tab.
    You can view the component information of ZooKeeper.

Connect to ZooKeeper

You can use the command line tool zkCli.sh to access ZooKeeper. zkCli.sh is in the /usr/lib/zookeeper-current/bin/ directory.

You can run the following command to connect to ZooKeeper:
/usr/lib/zookeeper-current/bin/zkCli.sh -server IP address/hostname:port

For more information about how to obtain the IP address and hostname, see View the component information of ZooKeeper. port indicates the port number.

Example:
/usr/lib/zookeeper-current/bin/zkCli.sh -server emr-header-1:2181