Apache kafka 如何将uuu consumer u offset清除策略更改为从compact中删除?

Apache kafka 如何将uuu consumer u offset清除策略更改为从compact中删除?,apache-kafka,delete-file,Apache Kafka,Delete File,我有3个节点的kafka群集,在kafka日志目录中有\uu consumer\u offsets-XX,大量日志文件,如磁盘使用的100MB,超过90%,执行命令: ./bin/kafka-configs.sh --zookeeper localhost:2181 --describe --entity-name __consumer_offsets --entity-type topics 主题的配置:\u消费者\u偏移量为: segment.bytes=104857600,cleanup

我有3个节点的kafka群集,在kafka日志目录中有
\uu consumer\u offsets-XX
,大量日志文件,如磁盘使用的100MB,超过90%,执行命令:

./bin/kafka-configs.sh --zookeeper localhost:2181 --describe --entity-name __consumer_offsets --entity-type topics
主题的配置:
\u消费者\u偏移量
为:

segment.bytes=104857600,cleanup.policy=compact,compression.type=producer

本主题清理策略很紧凑,如何更改为删除?

本主题是卡夫卡的系统主题。对其应用了两个清理策略:压缩和删除(offset.retention.minutes)

如果要减小该主题的大小,请执行以下操作:

  • 将segment.bytes更改为较小的量(param offsets.topic.segment.bytes)
  • 减少未使用消费者组的保留策略(参数offset.retention.minutes)
  • 尝试减少此主题的分区数量(param offsets.topic.num.partitions)

  • 我发现我的server.properties默认设置为'log.cleaner.enable=false',然后设置'log.cleaner.enable=true',并在开始标记为delete and remove logfile时重新启动kafka broker。