kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject kafka git commit: trivial change to add byte serializer to ProducerPerformance; patched by Jun Rao
Date Tue, 13 Jan 2015 17:55:30 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk e79ebdfe2 -> bfb2da3c8


trivial change to add byte serializer to ProducerPerformance; patched by Jun Rao


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/bfb2da3c
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/bfb2da3c
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/bfb2da3c

Branch: refs/heads/trunk
Commit: bfb2da3c82ab01f5914d5559ee196d5aa977b17c
Parents: e79ebdf
Author: Jun Rao <junrao@gmail.com>
Authored: Tue Jan 13 09:54:32 2015 -0800
Committer: Jun Rao <junrao@gmail.com>
Committed: Tue Jan 13 09:54:54 2015 -0800

----------------------------------------------------------------------
 .../org/apache/kafka/clients/tools/ProducerPerformance.java   | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/bfb2da3c/clients/src/main/java/org/apache/kafka/clients/tools/ProducerPerformance.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/clients/tools/ProducerPerformance.java
b/clients/src/main/java/org/apache/kafka/clients/tools/ProducerPerformance.java
index 1b82800..689bae9 100644
--- a/clients/src/main/java/org/apache/kafka/clients/tools/ProducerPerformance.java
+++ b/clients/src/main/java/org/apache/kafka/clients/tools/ProducerPerformance.java
@@ -15,10 +15,7 @@ package org.apache.kafka.clients.tools;
 import java.util.Arrays;
 import java.util.Properties;
 
-import org.apache.kafka.clients.producer.Callback;
-import org.apache.kafka.clients.producer.KafkaProducer;
-import org.apache.kafka.clients.producer.ProducerRecord;
-import org.apache.kafka.clients.producer.RecordMetadata;
+import org.apache.kafka.clients.producer.*;
 
 public class ProducerPerformance {
 
@@ -46,6 +43,8 @@ public class ProducerPerformance {
                 throw new IllegalArgumentException("Invalid property: " + args[i]);
             props.put(pieces[0], pieces[1]);
         }
+        props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.ByteArraySerializer");
+        props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.ByteArraySerializer");
         KafkaProducer<byte[], byte[]> producer = new KafkaProducer<byte[],byte[]>(props);
 
         /* setup perf test */


Mime
View raw message