Kafka - Zookeeper

> Data Integration Tool (ETL/ELT) > Kafka (Event Hub)

1 - About

Zookeeper in Kafka.

It is one of the Kafka service.

Advertising

3 - Functions

4 - Support

  • Clean up Zookeeper data folder peiodically
  • Protect it !

5 - Management

5.1 - Start

5.1.1 - Command line

Start Zookeeper in its own terminal.

./bin/zookeeper-server-start ./etc/kafka/zookeeper.properties
Advertising

5.1.2 - Docker

docker run -d \
    --net=host \
    --name=zookeeper \
    -e ZOOKEEPER_CLIENT_PORT=32181 \
    confluentinc/cp-zookeeper:latest

where run create a new container:

  • confluentinc/cp-zookeeper:latest is the confluentinc/cp-zookeeper image with the latest version.
  • name is the name of the container
  • –net=host to use the host networking
  • -e ZOOKEEPER_CLIENT_PORT=32181 pass a required environment variable for running ZooKeeper.

5.2 - Check

5.2.1 - Docker

docker logs zookeeper | grep -i binding
[2016-07-24 05:15:35,453] INFO binding to port 0.0.0.0/0.0.0.0:32181 (org.apache.zookeeper.server.NIOServerCnxnFactory)

The message shows the ZooKeeper service listening at the port you passed in the run as ZOOKEEPER_CLIENT_PORT.