|
|
|
@ -15,10 +15,7 @@ package org.apache.kafka.clients.tools;
@@ -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 {
@@ -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 */ |
|
|
|
|