changing kafka retention period during runtime

后端 未结 4 827
借酒劲吻你
借酒劲吻你 2020-12-12 14:56

With Kafka 0.8.1.1, how do I change the log retention time while it\'s running? The documentation says the property is log.retention.hours, but trying to change

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-12 15:19

    The following is the right way to alter topic config as of Kafka 0.10.2.0:

    bin/kafka-configs.sh --zookeeper  --alter --entity-type topics --entity-name test_topic --add-config retention.ms=86400000
    

    Topic config alter operations have been deprecated for bin/kafka-topics.sh.

    WARNING: Altering topic configuration from this script has been deprecated and may be removed in future releases.
         Going forward, please use kafka-configs.sh for this functionality`
    

提交回复
热议问题