kafka修改日志保留时间参数(不用重启kafka)
kafka-configs.sh –zookeeper localhost:2181 –entity-type topics–entity-name test –alter –add-config log.retention.hours=87600kafka-configs.sh –zookeeper localhost:2181 –entity-type topics–entit
·
默认7天 168小时 现在改成5天
kafka-configs.sh –zookeeper localhost:2181 –entity-type topics –entity-name test –alter –add-config log.retention.hours=120
更改参数解决,需要自己转换毫秒
kafka-configs.sh –zookeeper localhost:2181 –entity-type topics –entity-name test –alter –add-config retention.ms=43200000
更多推荐
所有评论(0)