利志分享
view_headline
开发工具箱
go教程
clickhouse教程
kafka教程
python教程
shell教程
原创杂文
开发工具箱
go教程
clickhouse教程
kafka教程
python教程
shell教程
原创杂文
Kafka创建主题报错:Exception in thread "main" joptsimple.UnrecognizedOptionException: zookeeper is not a recognized option
原创杂文 / 时间:2022-02-27 09:42:34 / 阅读:152 / 分享:0
Exception in thread "main" joptsimple.UnrecognizedOptionException: zookeeper is not a recognized option at joptsimple.OptionException.unrecognizedOption(OptionException.java:108) at joptsimple.OptionParser.handleLongOptionToken(OptionParser.java:510) at joptsimple.OptionParserState$2.handleArgument(OptionParserState.java:56) at joptsimple.OptionParser.parse(OptionParser.java:396) at kafka.admin.TopicCommand$TopicCommandOptions.<init>(TopicCommand.scala:567) at kafka.admin.TopicCommand$.main(TopicCommand.scala:47) at kafka.admin.TopicCommand.main(TopicCommand.scala) 原因: 在较新版本(2.2 及更高版本)的 Kafka 不再需要 ZooKeeper 连接字符串,即- -zookeeper localhost:2181。使用 Kafka Broker的 --bootstrap-server localhost:9092来替代- -zookeeper localhost:2181。 使用如下命令: ``` bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic test ``` 替换: ``` bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test ```
按时间分类
2022-04-22
2022-04-10
2022-03-26
2022-03-16
2022-03-08
2022-03-04
2022-02-27
2022-02-26
2022-02-19
2022-01-30
2022-01-23
2021-11-14
2021-11-06
2021-10-07
2021-09-21
2021-09-20
2021-09-15
2021-08-22
2021-08-13
2021-07-28
2021-06-17
2021-05-22
2021-04-23
2021-04-03
2021-03-07
2021-03-05
2021-03-04
2021-02-28
2021-02-21
2021-02-20