I just start working with Kafka-docker. And I'm taring to create a topic with the following command inside the docker:
./kafka-topics.sh --create --zookeeper zoo1:2181 --replication-factor 3 --partition 2 --topic test
It guive me the following error:
Exception in thread "main" joptsimple.UnrecognizedOptionException: partition 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:340)
at kafka.admin.TopicCommand$.main(TopicCommand.scala:43)
at kafka.admin.TopicCommand.main(TopicCommand.scala)
I have add the following lines in the hosts file:
127.0.0.1 kafka1
127.0.0.1 zoo1
It's not --partition, but --partitions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With