You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/06/09 15:00:42 UTC
[GitHub] [kafka] wenbingshen commented on a change in pull request #10853: KAFKA-12811: kafka-topics.sh should let the user know they cannot adj…ust the replication factor for a topic using the --alter flag and not warn about missing the --partition flag
wenbingshen commented on a change in pull request #10853:
URL: https://github.com/apache/kafka/pull/10853#discussion_r648397088
##########
File path: core/src/main/scala/kafka/admin/TopicCommand.scala
##########
@@ -574,6 +574,7 @@ object TopicCommand extends Logging {
if (has(alterOpt)) {
CommandLineUtils.checkInvalidArgsSet(parser, options, Set(bootstrapServerOpt, configOpt), Set(alterOpt),
Some(kafkaConfigsCanAlterTopicConfigsViaBootstrapServer))
+ CommandLineUtils.checkInvalidArgs(parser, options, replicationFactorOpt, Set(alterOpt))
Review comment:
The following command still prompts `Missing required argument "[partitions]"`: `./bin/kafka-topics.sh --bootstrap-server `hostname`:9092 --alter --topic test-01 --replica-assignment 1002:1001,1003:1002,1001:1003,1001:1002,1002:1003,1003:1001,1002:1003 --replication-factor 3`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org