node listzookeepers

Returns the hostnames of the nodes in the cluster that are running the ZooKeeper service.

Syntax

CLI
maprcli node listzookeepers
    [ -cluster <cluster name> ]
    [ -cldb  <cldb hostname|ip:port> ]
REST
Request Type GET
Request URL
http[s]://<host>:<port>/rest/node/listzookeepers[?<parameters>] 

Parameters

Parameter

Description

cluster

The name of the cluster for which to return the list of zookeeper node hostnames.

cldb

The hostname or IP address and port number of a valid CLDB node. The other CLDB nodes and zookeeper nodes can be discovered from this node.

Examples

Return the list of zookeeper nodes for the cluster my.cluster.com

If you know that the CLDB service is running on a node with hostname host1, you can enter:

maprcli node listzookeepers -cluster my.cluster.com -cldb host1 -json
{
	"timestamp":1529451245796,
	"timeofday":"2018-06-19 04:34:05.796 GMT-0700 PM",
	"status":"OK",
	"total":1,
	"data":[
		{
			"Zookeepers":"in111-21.qa.lab:5181,in111-22.qa.lab:5181,in111-24.qa.lab:5181"
		}
	]
}
https://abc.sj.us:8443/rest/node/listzookeepers?cluster=my.cluster.com&cldb=host1
{"timestamp":1529451245796,"timeofday":"2018-06-19 04:34:05.796 GMT-0700 PM","status":"OK","total":1,"data":[{"Zookeepers":"in111-21.qa.lab:5181,in111-22.qa.lab:5181,in111-24.qa.lab:5181"}]}