GitHub user SandeshKarkera opened a pull request:

    https://github.com/apache/kafka/pull/2158

    KAFKA-4432: Added support to supply custom message payloads to 
perf-producer script.

    Current implementation of ProducerPerformance creates static payload. This 
is not very useful in testing compression or when you want to test with 
production/custom payloads. So, we decided to add support for providing payload 
file as an input to producer perf test script.
    
    We made the following changes:
    1. Added support to provide a payload file which can have the list of 
payloads that you actually want to send.
    2. Moved payload generation inside the send loop for cases when payload 
file is provided.
    
    Following are the changes to how the producer-performance is evoked:
    1. You must provide "--record-size" or "--payload-file" but not both. This 
is because, record size cannot be guaranteed when you are using custom events.
      e.g. ./kafka-producer-perf-test.sh --topic test_topic --num-records 
100000 --producer-props bootstrap.servers=127.0.0.1:9092 acks=0 
buffer.memory=33554432 compression.type=gzip batch.size=10240 linger.ms=10 
--throughput -1 --payload-file ./test_payloads --payload-delimiter ,
    2. Earlier "--record-size" was a required config, now you must provide 
exactly one of "--record-size" or "--payload-file". Providing both will result 
in an error.
    3. Support for an additional parameter "--payload-delimiter" has been added 
which defaults to "\n"

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/SandeshKarkera/kafka PerfProducerChanges

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/2158.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2158
    
----
commit af6c6d910ae3915c769ebac326ade329a724cda4
Author: Sandesh K <sandesh.kark...@flipkart.com>
Date:   2016-11-22T11:08:03Z

    KAFKA-4432: Added support to supply custom message payloads

commit df278060a04fa844f150f30ae534a310c47c0eb3
Author: Sandesh K <sandesh.kark...@flipkart.com>
Date:   2016-11-22T15:53:52Z

    KAFKA-4432: Fixed checkstyle issues

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to