kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewe...@apache.org
Subject kafka git commit: MINOR: Respect the default value of partition argument in SimpleConsumerShell
Date Sun, 12 Jun 2016 00:50:45 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 250981fb9 -> b058fcf5e


MINOR: Respect the default value of 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.

Author: Vahid Hashemian <vahidhashemian@us.ibm.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1495 from vahidhashemian/minor/simple_consumer_shell_update_required_args


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/b058fcf5
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/b058fcf5
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/b058fcf5

Branch: refs/heads/trunk
Commit: b058fcf5ec3b818f7275d6d3591881c69033a830
Parents: 250981f
Author: Vahid Hashemian <vahidhashemian@us.ibm.com>
Authored: Sat Jun 11 17:50:38 2016 -0700
Committer: Ewen Cheslack-Postava <me@ewencp.org>
Committed: Sat Jun 11 17:50:38 2016 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/tools/SimpleConsumerShell.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/b058fcf5/core/src/main/scala/kafka/tools/SimpleConsumerShell.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/tools/SimpleConsumerShell.scala b/core/src/main/scala/kafka/tools/SimpleConsumerShell.scala
index c975d24..26fa336 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()


Mime
View raw message