对于kafka spark Streaming出现的问题1
当生产者发送消息 出现ERROR Error when sending message to topic test with key: null, value: 36 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback) 而对于消费者不断循环 对于sparkStreaming
当生产者发送消息 出现ERROR Error when sending message to topic test with key: null, value: 36 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
而对于消费者不断循环
对于sparkStreaming 则出现请求延时等问题
通过查找问题发现
通通过删除topic 在kafka中删除后 然后在zookeeper上删除 而接着又重建之前的同名topic (此时会被标记为test - marked for deletion)所以出现这种问题
所以通过这种方式删除的topic并未彻底删除 需要进一步删除(设置)
方式
如何删除一个topic
删除一个topic有两个关键点:
1,配置删除参数
delete.topic.enable这个Broker参数配置为True。
2,执行
bin/kafka-topics.sh --zookeeper zk_host:port/chroot --delete --topic my_topic_name
假如不配置删除参数为true的话,topic其实并没有被清除,只是被标记为删除。此时,估计一般人的做法是删除topic在Zookeeper的信息和日志,其实这个操作并不会清除kafkaBroker内存的topic数据。所以,此时最佳的策略是配置删除参数为true然后,重启kafka。
更多推荐
所有评论(0)