THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
To provide a consistent user experience, it would be nice to add a '--help' option to all Kafka commands.
Public Interfaces
Add a '--help' option to all Kafka commands that provides information about their usage.
Proposed Changes
Parsing logic of the Kafka commands shall be modified to handle the "--help" option.
...
Code modifications
...
(git diff)
Code Block | ||
---|---|---|
| ||
@@ -72,7 +72,13 @@ object BrokerApiVersionsCommand { .withRequiredArg .describedAs("server(s) to use for bootstrapping") .ofType(classOf[String]) + val helpOpt = parser.accepts("help", "Print usage information.") + val options = parser.parse(args : _*) + + if (options.has(helpOpt)) + CommandLineUtils.printUsageAndDie(parser, "Usage:") + checkArgs() def checkArgs() { |
...