Skip to content

Commit

Permalink
trivial change to add byte serializer to ProducerPerformance; patched…
Browse files Browse the repository at this point in the history
… by Jun Rao
  • Loading branch information
junrao committed Jan 13, 2015
1 parent e79ebdf commit bfb2da3
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
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 {

Expand Down Expand Up @@ -46,6 +43,8 @@ public static void main(String[] args) throws Exception {
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 */
Expand Down

0 comments on commit bfb2da3

Please sign in to comment.