You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ij...@apache.org on 2017/06/16 15:52:34 UTC

kafka git commit: MINOR: clarify partition option behavior for console consumer

Repository: kafka
Updated Branches:
  refs/heads/trunk c83719f3d -> 354cbebdc


MINOR: clarify partition option behavior for console consumer

Console Consumer help doesn't say that ``--partition`` option needs ``--offset`` otherwise will consume from the end of the partition. This minor fix makes that happen.

Author: Dustin Cote <du...@confluent.io>

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

Closes #3153 from cotedm/console_consumer_help_fix


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

Branch: refs/heads/trunk
Commit: 354cbebdc1f26f745aaf614486449fbe240a88e0
Parents: c83719f
Author: Dustin Cote <du...@confluent.io>
Authored: Fri Jun 16 16:52:30 2017 +0100
Committer: Ismael Juma <is...@juma.me.uk>
Committed: Fri Jun 16 16:52:30 2017 +0100

----------------------------------------------------------------------
 core/src/main/scala/kafka/tools/ConsoleConsumer.scala | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/354cbebd/core/src/main/scala/kafka/tools/ConsoleConsumer.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/tools/ConsoleConsumer.scala b/core/src/main/scala/kafka/tools/ConsoleConsumer.scala
index 335c724..fd76387 100755
--- a/core/src/main/scala/kafka/tools/ConsoleConsumer.scala
+++ b/core/src/main/scala/kafka/tools/ConsoleConsumer.scala
@@ -218,7 +218,8 @@ object ConsoleConsumer extends Logging {
       .withRequiredArg
       .describedAs("blacklist")
       .ofType(classOf[String])
-    val partitionIdOpt = parser.accepts("partition", "The partition to consume from.")
+    val partitionIdOpt = parser.accepts("partition", "The partition to consume from. Consumption " +
+      "starts from the end of the partition unless '--offset' is specified.")
       .withRequiredArg
       .describedAs("partition")
       .ofType(classOf[java.lang.Integer])