[ https://issues.apache.org/jira/browse/KAFKA-267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13483293#comment-13483293 ]
Jun Rao commented on KAFKA-267: ------------------------------- Thanks for patch v5. Looks good. Some minor comments: 50. In the following line in generateProducerData(), we should allocate a byte array and pass it to the constructor of Message. ByteBuffer.array() gives you the backing array and it may or may not be the size that you allocated. new Message(ByteBuffer.allocate(if(config.isFixSize) config.messageSize else 1 + rand.nextInt(config.messageSize)).array()) 51. Could you break all long lines into multiple lines? 52. Could you expose producer.num.retries and producer.retry.backoff.ms to the command line and default them to the same value as in ProducerConfig? > Enhance ProducerPerformance to generate unique random Long value for payload > ---------------------------------------------------------------------------- > > Key: KAFKA-267 > URL: https://issues.apache.org/jira/browse/KAFKA-267 > Project: Kafka > Issue Type: Improvement > Reporter: John Fung > Assignee: Yang Ye > Attachments: kafka-267-v1.patch, kafka-267-v2.patch, > kafka-267-v3.patch, kafka-267-v4.patch, kafka-267-v5.patch > > > This is achieved by: > 1. Adding a new class UniqueRandom to shuffle a range of numbers. > 2. An optional new argument "start-index" is added to specify the starting > number of the range to be shuffled. If this argument is omitted, it is > defaulted to 1. So it is backward compatible with the argument options. > 3. The ending number of the range is the starting number + number of messages > - 1. > Other ProducerPerformance advancement: > 1. producing to multiple topics > 2. supporting multiple instances of producer performance ( and distinguishes > them) > 3. allowing waiting some time after sending a request -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira