Jose
Jose

Reputation: 1829

How can I get into the Zookeeper that is integrated in Kafka? ( 2.2.0 )

I have installed a kafka that has integrated zookeeper.

I have seen that to enter an independent Zookeeper installation, you can run the following command to enter the zookeeper console:

bin/ZkCli.sh
ls /zookeeper/quota

But in Kafka's scripts I only have:

zookeeper-security-migration.sh
zookeeper-server-start.sh
zookeeper-server-stop.sh
zookeeper-shell.sh

I have tried to do the following:

./zookeeper-shell.sh -server 127.0.0.1:2181 ls /zookeeper/quota

But it doesn't work, it doesn't do anything

How can I get into the Zookeeper that is integrated in Kafka?

Upvotes: 3

Views: 670

Answers (1)

Mickael Maison
Mickael Maison

Reputation: 26885

After starting Zookeeper, you can connect to it using the zookeeper-shell.sh tool.

To get into the shell:

./zookeeper-shell IP:2181

Then you can execute commands, like:

ls /

You can use cd to move within the nodes and get to print the content of nodes.

You can also use this script to just run commands and return (without getting into the shell)

./zookeeper-shell.sh localhost:2181 get /controller

/zookeeper/quota is not a path used by Kafka, Quotas are stored under /config

Upvotes: 2

Related Questions