During the development cycle, chances are you want to reset the entire Kafka cluster to the original state just like a referesh installation. Here are the steps to archive that.
If there are consumers or producers that are connecting to your Kafka cluster, you need to stop them. For Taiji-chain cluster, we need to stop the chain-writer, chain-reader and token-reader on each Kafka node.
docker-compose -f docker-compose-test1.yaml down
repeat the above for test2 and test3
Stop the schema-registry server on the sandbox. If this server is left running, the old schema are still cached and will saved back to the new Kafka topic.
docker-compose -f docker-compose-schema-registry.yml down
Stop Kafka instances on three nodes.
sudo systemctl stop kafka
Stop Zookeeper on three nodes
sudo systemctl stop zookeeper
Let’s clearn up Kafka data in /opt/kafka-logs and zookeeper data in /var/zookeeper/version-2 on each node