- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
URGENT - accidentally deleted /config/topics directory inside zookeeper by zkcli.
- Labels:
-
Apache Kafka
-
Cloudera Manager
Created 04-25-2022 01:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
accidentally deleted /config/topics directory within zookeeper zkcli.
so far the kafka cluster is operational, but we need to know what this directory can interfere with in the future?
Is it possible to restore this /config/topics directory in zookeeper?
Created 08-06-2022 12:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A] Generally /config/topics/ will store all topic level configuration if you have set any.
For example:
If you have set any topic level setting then it will be stored there:
[zk: node1.zookeeper-hostname.com:2181(CONNECTED) 6] get /kafka/config/topics/ATLAS_HOOK
{"version":1,"config":{"retention.ms":"2678400000","cleanup.policy":"compact"}}
[zk:node1.zookeeper-hostname.com:2181(CONNECTED) 7]
Here topic level settings are retention.ms and cleanup.policy=compact
As it has only topic-level configuration details it will not affect the Kafka cluster or applications if applications are not dependent on any topic-level settings.
B] There is no standard Kafka tool which you can use to restore /config/topics but you can easily alter/set topic level settings using the Kafka command below as per your retirement if any.
kafka-configs --zookeeper <ZK_host>:2181/kafka --entity-type topics --entity-name <topic_name> --alter --add-config <configname & value>
Note: Replace all required settings and /kafka (/kafka can be checked from CM >> Kafka >> Conf >> zookeeper.chroot) in the above command
If you found this response assisted with your query, please take a moment to log in and click on KUDOS 🙂 & ”Accept as Solution" below this post.
