Browse Source

MINOR: Add --help to DumpLogSegments

Author: Tom Bentley <tbentley@redhat.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>

Closes #3351 from tombentley/help
pull/3355/merge
Tom Bentley 8 years ago committed by Ismael Juma
parent
commit
6cd7f448aa
  1. 6
      core/src/main/scala/kafka/tools/DumpLogSegments.scala

6
core/src/main/scala/kafka/tools/DumpLogSegments.scala

@ -66,11 +66,13 @@ object DumpLogSegments {
val transactionLogOpt = parser.accepts("transaction-log-decoder", "if set, log data will be parsed as " + val transactionLogOpt = parser.accepts("transaction-log-decoder", "if set, log data will be parsed as " +
"transaction metadata from the __transaction_state topic.") "transaction metadata from the __transaction_state topic.")
if(args.length == 0) val helpOpt = parser.accepts("help", "Print usage information.")
CommandLineUtils.printUsageAndDie(parser, "Parse a log file and dump its contents to the console, useful for debugging a seemingly corrupt log segment.")
val options = parser.parse(args : _*) val options = parser.parse(args : _*)
if(args.length == 0 || options.has(helpOpt))
CommandLineUtils.printUsageAndDie(parser, "Parse a log file and dump its contents to the console, useful for debugging a seemingly corrupt log segment.")
CommandLineUtils.checkRequiredArgs(parser, options, filesOpt) CommandLineUtils.checkRequiredArgs(parser, options, filesOpt)
val printDataLog = options.has(printOpt) || val printDataLog = options.has(printOpt) ||

Loading…
Cancel
Save