kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject kafka git commit: MINOR: clarify partition option behavior for console consumer
Date Fri, 16 Jun 2017 15:52:43 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.11.0 67e944438 -> 145df86ff


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 <dustin@confluent.io>

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

Closes #3153 from cotedm/console_consumer_help_fix

(cherry picked from commit 354cbebdc1f26f745aaf614486449fbe240a88e0)
Signed-off-by: Ismael Juma <ismael@juma.me.uk>


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

Branch: refs/heads/0.11.0
Commit: 145df86ff792aae579cf2e698b8f491481831ed9
Parents: 67e9444
Author: Dustin Cote <dustin@confluent.io>
Authored: Fri Jun 16 16:52:30 2017 +0100
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Fri Jun 16 16:52:39 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/145df86f/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])


Mime
View raw message