Created on 08-26-2016 05:37 AM - edited 09-16-2022 03:36 AM
Version Info:
Kafka Version: 0.8.2
Cloudera Enterprise: 5.4.7
Problem:
We have a topic with following configuration for cleanup:
min.cleanable.dirty.ratio=0.01,segment.ms=3600000,min.insync.replicas=2,cleanup.policy=compact
We changed the topic cleanup policy to delete by issuing an alter topic as follows:
kafka-topics --alter --zookeeper <zk quorum> --config retention.ms=2592000000 --delete-config min.cleanable.dirty.ratio --delete-config segment.ms --delete-config cleanup.policy --topic <topic_name>
This removed all those configs and config after alter looked like this:
retention.ms=2592000000,min.insync.replicas=2
Since default cleanup policy is delete, we just deleted it instead of changing to delete explicitly.
Our log cleaner thread runs every 5 min. (In cloudera manager config page). But these changes are not taking effect until i rolling restarted our Kafka broker.
I dont see any reference to restart in kafka alter documentation. I am not sure why it is not taking effect immediately.
Are there any other config values that govern (apart from cleaner thread schedule) that governs when and how cleanup policy takes effect ?
Thanks,
Vivek
Created 08-29-2016 08:32 AM
Created 08-29-2016 08:34 AM
Thanks for the feedback. That's what we did and it applied the changes immediately.
Created 09-10-2016 07:57 PM
Hi,
Is this still a requirement in 0.9.0.1 or 0.10 of kafka release? We are currently on 0.9.0.1 but may upgrade to 0.10 soon. Restart is not a feasible option for us for altering retention period for a topic.
Regards
Swami