Spread the loveKafka Topics List existing topics bin/kafka-topics.sh –zookeeper localhost:2181 –list Purge a topic bin/kafka-topics.sh –zookeeper localhost:2181 –alter –topic mytopic –config retention.ms=1000 … wait a minute … bin/kafka-topics.sh –zookeeper localhost:2181 –alter –topic mytopic –delete-config retention.ms
Here we see why do we need Apache Zookeeper and where we use Apache Zookeeper.
Coordination services: The process of Integrating or communicating b/w the services in a distributed environment.
Coordination services are notoriously hard to get right. They are especially prone to errors such as race conditions and deadlock.
Race condition: − Two or more systems are trying to perform the same task, which actually needs to be done only by a single system at a given time. For example, shared resources should only be modified by a single machine at any given time.
Deadlock − Two or more operations waiting for each other to complete indefinitely.
To make the co-ordination in distributed environment easy, developer came up with ZooKeeper so that we don’t to implement our own coordination services from scratch.