From 54e7fba208d83526044d78b8ae85a428cb94157e Mon Sep 17 00:00:00 2001 From: Vahid Hashemian Date: Fri, 10 Jun 2016 16:53:07 -0700 Subject: [PATCH] Minor: Respect the default value for partition argument in SimpleConsumerShell The 'partition' argument is not marked as required, and has a default of 0, according to the tool's help message. However, if 'partition' is not provided the command returns with 'Missing required argument "[partition]"'. This patch is to fix the required arguments of the tool by removing 'partition' from them. --- core/src/main/scala/kafka/tools/SimpleConsumerShell.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/scala/kafka/tools/SimpleConsumerShell.scala b/core/src/main/scala/kafka/tools/SimpleConsumerShell.scala index c975d24e5ce0..26fa3368ff92 100755 --- a/core/src/main/scala/kafka/tools/SimpleConsumerShell.scala +++ b/core/src/main/scala/kafka/tools/SimpleConsumerShell.scala @@ -101,7 +101,7 @@ object SimpleConsumerShell extends Logging { CommandLineUtils.printUsageAndDie(parser, "A low-level tool for fetching data directly from a particular replica.") val options = parser.parse(args : _*) - CommandLineUtils.checkRequiredArgs(parser, options, brokerListOpt, topicOpt, partitionIdOpt) + CommandLineUtils.checkRequiredArgs(parser, options, brokerListOpt, topicOpt) val topic = options.valueOf(topicOpt) val partitionId = options.valueOf(partitionIdOpt).intValue()