查看偏移量,报 WARN WARNING: ConsumerOffsetChecker is deprecated and will be dropped in releases following 0.9.0. Use ConsumerGroupCommand instead.

小蕊 发表于: 2016-06-13   最后更新时间: 2016-06-13 09:55:44   9,394 游览

查看偏移量,报 WARN WARNING: ConsumerOffsetChecker is deprecated and will be dropped in releases following 0.9.0. Use ConsumerGroupCommand instead.


我用命令查看偏移量时候,报以下错误

[root@linux21-58 kafka_2.11-0.10.0.0]# bin/kafka-run-class.sh kafka.tools.ConsumerOffsetChecker --zkconnect localhost:2181 --group test
[2016-06-13 09:44:22,921] WARN WARNING: ConsumerOffsetChecker is deprecated and will be dropped in releases following 0.9.0. Use ConsumerGroupCommand instead. (kafka.tools.ConsumerOffsetChecker$)
Exception in thread "main" joptsimple.UnrecognizedOptionException: 'zkconnect' is not a recognized option
    at joptsimple.OptionException.unrecognizedOption(OptionException.java:93)
    at joptsimple.OptionParser.handleLongOptionToken(OptionParser.java:402)
    at joptsimple.OptionParserState$2.handleArgument(OptionParserState.java:55)
    at joptsimple.OptionParser.parse(OptionParser.java:392)
    at kafka.tools.ConsumerOffsetChecker$.main(ConsumerOffsetChecker.scala:133)
    at kafka.tools.ConsumerOffsetChecker.main(ConsumerOffsetChecker.scala)
这是什么原因啊?

发表于 2016-06-13

0.9版本以后,偏移量命令ConsumerOffsetChecker已弃用,用新的命令来查。

// 列表

bin/kafka-consumer-groups.sh --zookeeper localhost:2181 --list

// 偏移量描述

bin/kafka-consumer-groups.sh --zookeeper localhost:2181 --describe --group test-consumer-group

小蕊 -> 無名 8年前

厉害啊!

bin/kafka-consumer-groups.sh --new-consumer --bootstrap-server localhost:9092 --describe --group myself

你的答案

查看kafka相关的其他问题或提一个您自己的问题