Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including
Stack Overflow
, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this community
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
We have 3 kafka machines version - 0.10.0.2.6
We want to purge all data files from all kafka's topics ( purge completely all data )
The CLI for this action should be ( should be run from the zoo server )
kafka-topics.sh --zookeeper localhost:2181 --alter --topic Topic1 --config retention.ms=1000
kafka-topics.sh --zookeeper localhost:2181 --alter --topic Topic2 --config retention.ms=1000
kafka-topics.sh --zookeeper localhost:2181 --alter --topic Topic3 --config retention.ms=1000
kafka-topics.sh --zookeeper localhost:2181 --alter --topic Topic4 --config retention.ms=1000
Since we Temporarily update the retention time on the topic to one second (1000 ms )
Then how to return the previous original retention!
Note - log.retention.hours = 168 ( from the ambari GUI ) and this is the original value
So how to return the original value (168 hours) back on all topics ? after purge all Topics?