Kafka
  1. Kafka
  2. KAFKA-1517

Messages is a required argument to Producer Performance Test

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.8.1.1
    • Fix Version/s: 0.8.3
    • Component/s: None
    • Labels:

      Description

      When running the producer performance test without providing a messages argument, you get an error:

      $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)
      

      However the shell command documentation doesn't say that this is required and implies that 2^63-1 (Long.MaxValue) messages will be sent. It should probably look like the ConsoleProducer 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?

        Activity

        Daniel Compton created issue -
        Daniel Compton made changes -
        Field Original Value New Value
        Description 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] or make this a non-required argument and set the default value to something sane like 100,000 messages.

        Which option is preferable for this?
        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 make this a non-required argument and set the default value to something sane like 100,000 messages.

        Which option is preferable for this?
        Daniel Compton made changes -
        Description 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 make this a non-required argument and set the default value to something sane like 100,000 messages.

        Which option is preferable for this?
        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 we should make this a non-required argument and set the default value to something sane like 100,000 messages.

        Which option is preferable for this?
        Daniel Compton made changes -
        Description 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 we should make this a non-required argument and set the default value to something sane like 100,000 messages.

        Which option is preferable for this?
        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?
        Neha Narkhede made changes -
        Labels newbie
        Daniel Compton made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Daniel Compton made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Daniel Compton made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Daniel Compton made changes -
        Comment [ From 3cb6dd13ab487b72ff73f375617a372360418708 Mon Sep 17 00:00:00 2001
        From: Daniel Compton <desk@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 ]
        Daniel Compton made changes -
        Daniel Compton made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Daniel Compton made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Jun Rao made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Assignee Daniel Compton [ danielcompton ]
        Fix Version/s 0.8.3 [ 12328745 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Daniel Compton
            Reporter:
            Daniel Compton
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development