ijuma commented on a change in pull request #10457: URL: https://github.com/apache/kafka/pull/10457#discussion_r635196307
########## File path: core/src/main/scala/kafka/admin/TopicCommand.scala ########## @@ -739,18 +563,15 @@ object TopicCommand extends Logging { CommandLineUtils.printUsageAndDie(parser, "Command must include exactly one action: --list, --describe, --create, --alter or --delete") // check required args - if (has(bootstrapServerOpt) == has(zkConnectOpt)) - throw new IllegalArgumentException("Only one of --bootstrap-server or --zookeeper must be specified") - if (!has(bootstrapServerOpt)) - CommandLineUtils.checkRequiredArgs(parser, options, zkConnectOpt) - if(has(describeOpt) && has(ifExistsOpt)) + throw new IllegalArgumentException("--bootstrap-server must be specified") + if (has(describeOpt) && has(ifExistsOpt)) CommandLineUtils.checkRequiredArgs(parser, options, topicOpt) if (!has(listOpt) && !has(describeOpt)) CommandLineUtils.checkRequiredArgs(parser, options, topicOpt) - if (has(createOpt) && !has(replicaAssignmentOpt) && has(zkConnectOpt)) + if (has(createOpt) && !has(replicaAssignmentOpt)) Review comment: Was it a bug that we only verified this when `zkConnectOpt` was set? If so, we should add a unit test for this case. -- 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: us...@infra.apache.org