kafka修改topic retention.ms参数执行异常

通过kafka-topic.sh脚本修改retention.ms参数后,发现磁盘空间一直没有释放.
查看server.log发现提示”ERROR Error processing notification change for path = /config/changes”的错误。

[2019-03-07 21:31:03,194] ERROR Error processing notification change for path = /config/changes and notification= [config_change_0000000014, config_change_0000000013, config_change_0000000016, config_change_0000000015] : (kafka.common.ZkNodeChangeNotificationListener)
java.lang.IllegalArgumentException: requirement failed
        at scala.Predef$.require(Predef.scala:212)
        at kafka.server.DynamicConfigManager$ConfigChangedNotificationHandler$.processNotification(DynamicConfigManager.scala:90)
        at kafka.common.ZkNodeChangeNotificationListener$$anonfun$kafka$common$ZkNodeChangeNotificationListener$$processNotifications$2$$anonfun$apply$2.apply(ZkNodeChangeNotificationListener.scala:95)
        at kafka.common.ZkNodeChangeNotificationListener$$anonfun$kafka$common$ZkNodeChangeNotificationListener$$processNotifications$2$$anonfun$apply$2.apply(ZkNodeChangeNotificationListener.scala:95)
        at scala.Option.map(Option.scala:146)
        at kafka.common.ZkNodeChangeNotificationListener$$anonfun$kafka$common$ZkNodeChangeNotificationListener$$processNotifications$2.apply(ZkNodeChangeNotificationListener.scala:95)
        at kafka.common.ZkNodeChangeNotificationListener$$anonfun$kafka$common$ZkNodeChangeNotificationListener$$processNotifications$2.apply(ZkNodeChangeNotificationListener.scala:90)
        at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
        at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
        at kafka.common.ZkNodeChangeNotificationListener.kafka$common$ZkNodeChangeNotificationListener$$processNotifications(ZkNodeChangeNotificationListener.scala:90)
        at kafka.common.ZkNodeChangeNotificationListener$NodeChangeListener$.handleChildChange(ZkNodeChangeNotificationListener.scala:137)
        at org.I0Itec.zkclient.ZkClient$10.run(ZkClient.java:843)
        at org.I0Itec.zkclient.ZkEventThread.run(ZkEventThread.java:71)

解决方法删除/config/changes下面的数据信息,重新执行alter即可。

[zk: localhost:2181(CONNECTED) 10] ls /kafka/config/changes/config_change_00000000

config_change_0000000013   config_change_0000000016   config_change_0000000015   config_change_0000000021   config_change_0000000020  
config_change_0000000018   config_change_0000000017   config_change_0000000019

[zk: localhost:2181(CONNECTED) 10] rmr /kafka/config/changes/config_change_0000000013
此条目发表在kafka分类目录,贴了, 标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据