dengziming commented on code in PR #12797:
URL: https://github.com/apache/kafka/pull/12797#discussion_r1042208012
##########
core/src/main/scala/kafka/admin/BrokerApiVersionsCommand.scala:
##########
@@ -95,8 +96,6 @@ object BrokerApiVersionsCommand {
def checkArgs(): Unit = {
CommandLineUtils.printHelpAndExitIfNeeded(this, "This tool helps to
retrieve broker version information.")
- // check required args
- CommandLineUtils.checkRequiredArgs(parser, options, bootstrapServerOpt)
Review Comment:
We still should check that bootstrapServer is passed in through either args
or property file, right?
##########
core/src/main/scala/kafka/tools/ConsoleConsumer.scala:
##########
@@ -218,7 +220,7 @@ object ConsoleConsumer extends Logging {
.withRequiredArg
.describedAs("consumer_prop")
.ofType(classOf[String])
- val consumerConfigOpt = parser.accepts("consumer.config", s"Consumer
config properties file. Note that $consumerPropertyOpt takes precedence over
this config.")
+ val consumerConfigOpt = parser.acceptsAll(Arrays.asList("consumer.config",
"command-config"), s"Consumer config properties file. Note that
$consumerPropertyOpt takes precedence over this config.")
Review Comment:
What's this change intended for?
##########
core/src/main/scala/kafka/tools/ConsoleConsumer.scala:
##########
@@ -367,8 +369,6 @@ object ConsoleConsumer extends Logging {
else if (fromBeginning) ListOffsetsRequest.EARLIEST_TIMESTAMP
else ListOffsetsRequest.LATEST_TIMESTAMP
- CommandLineUtils.checkRequiredArgs(parser, options, bootstrapServerOpt)
Review Comment:
ditt.
##########
core/src/main/scala/kafka/tools/ConsoleProducer.scala:
##########
@@ -261,9 +260,6 @@ object ConsoleProducer {
val bootstrapServer = options.valueOf(bootstrapServerOpt)
val brokerList = options.valueOf(brokerListOpt)
- val brokerHostsAndPorts = options.valueOf(if
(options.has(bootstrapServerOpt)) bootstrapServerOpt else brokerListOpt)
- ToolsUtils.validatePortOrDie(parser, brokerHostsAndPorts)
Review Comment:
ditto
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]