Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-14355

Integer overflow occurs in kafka-producer-perf-test.sh (class ProducerProfrmance ).

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.3.1
    • 3.4.0
    • tools
    • None

    Description

       

      An integer overflow occurs if a fairly large value is passed to --num-records.  It causes a NegativeArraySizeException error.

      ./bin/kafka-producer-perf-test.sh --topic=test --producer-props bootstrap.servers=localhost:9092 --num-records 2000000000000000 --throughput 1 --record-size 10
      Exception in thread "main" java.lang.NegativeArraySizeException
          at org.apache.kafka.tools.ProducerPerformance$Stats.<init>(ProducerPerformance.java:354)
          at org.apache.kafka.tools.ProducerPerformance.start(ProducerPerformance.java:97)
          at org.apache.kafka.tools.ProducerPerformance.main(ProducerPerformance.java:52)

      Attachments

        Issue Links

          Activity

            People

              mintomio Minoru Tomioka
              mintomio Minoru Tomioka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: