You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Daniel Compton (JIRA)" <ji...@apache.org> on 2014/07/22 03:14:40 UTC
[jira] [Issue Comment Deleted] (KAFKA-1517) Messages is a required
argument to Producer Performance Test
[ https://issues.apache.org/jira/browse/KAFKA-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Compton updated KAFKA-1517:
----------------------------------
Comment: was deleted
(was: From 3cb6dd13ab487b72ff73f375617a372360418708 Mon Sep 17 00:00:00 2001
From: Daniel Compton <de...@danielcompton.net>
Date: Tue, 22 Jul 2014 13:10:19 +1200
Subject: [PATCH] KAFKA-1517; Make messages a required argument
---
core/src/main/scala/kafka/tools/PerfConfig.scala | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/core/src/main/scala/kafka/tools/PerfConfig.scala b/core/src/main/scala/kafka/tools/PerfConfig.scala
index 129cc01..517a2cd 100644
--- a/core/src/main/scala/kafka/tools/PerfConfig.scala
+++ b/core/src/main/scala/kafka/tools/PerfConfig.scala
@@ -22,11 +22,10 @@ import joptsimple.OptionParser
class PerfConfig(args: Array[String]) {
val parser = new OptionParser
- val numMessagesOpt = parser.accepts("messages", "The number of messages to send or consume")
+ val numMessagesOpt = parser.accepts("messages", "REQUIRED: The number of messages to send or consume")
.withRequiredArg
.describedAs("count")
.ofType(classOf[java.lang.Long])
- .defaultsTo(Long.MaxValue)
val reportingIntervalOpt = parser.accepts("reporting-interval", "Interval at which to print progress info.")
.withRequiredArg
.describedAs("size")
--
1.9.2)
> Messages is a required argument to Producer Performance Test
> ------------------------------------------------------------
>
> Key: KAFKA-1517
> URL: https://issues.apache.org/jira/browse/KAFKA-1517
> Project: Kafka
> Issue Type: Bug
> Affects Versions: 0.8.1.1
> Reporter: Daniel Compton
> Priority: Trivial
> Labels: newbie
>
> When running the producer performance test without providing a messages argument, you get an error:
> {noformat}
> $bin/kafka-producer-perf-test.sh --topics mirrormirror --broker-list kafka-dc21:9092
> Missing required argument "[messages]"
> Option Description
> ------ -----------
> ......
> --messages <Long: count> The number of messages to send or
> consume (default:
> 9223372036854775807)
> {noformat}
> However the [shell command documentation|https://github.com/apache/kafka/blob/c66e408b244de52f1c5c5bbd7627aa1f028f9a87/perf/src/main/scala/kafka/perf/PerfConfig.scala#L25] doesn't say that this is required and implies that [2^63-1|http://en.wikipedia.org/wiki/9223372036854775807] (Long.MaxValue) messages will be sent. It should probably look like the [ConsoleProducer|https://github.com/apache/kafka/blob/c66e408b244de52f1c5c5bbd7627aa1f028f9a87/core/src/main/scala/kafka/producer/ConsoleProducer.scala#L32] and prefix the documentation with REQUIRED. Or should we make this a non-required argument and set the default value to something sane like 100,000 messages.
> Which option is preferable for this?
--
This message was sent by Atlassian JIRA
(v6.2#6252)