Package com.mapr.streams.producer
Class ProducerPerformance
- java.lang.Object
-
- com.mapr.streams.producer.ProducerPerformance
-
public class ProducerPerformance extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static longbatchSleepMsstatic booleancheckLagstatic booleanhashKeystatic booleanignoreErrstatic longmetadataRefreshMsstatic intmsgValueLengthstatic booleanmultipleFlushersstatic booleanneedVerifystatic intnumBatchesstatic intnumMsgsPerPartitionstatic intnumPartitionsstatic intnumSlowTopicsstatic intnumTopicsstatic booleanprintProgressstatic org.apache.kafka.clients.producer.KafkaProducerproducerstatic longproducerPoolSzstatic booleanroundRobinstatic intslowToNormalTopicRatiostatic java.lang.StringstreamNamestatic java.lang.String[]topicNamesstatic inttotalNumMsgs
-
Constructor Summary
Constructors Constructor Description ProducerPerformance()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)static booleanrunBasicTest(java.lang.String stream, int nmsgs, int ntopics, int slowTopics, int npartitions, int nbatches, long sleepms, boolean mflushers, boolean progress, int msgsz, long poolsz, long metadataMillis)static booleanrunStressTest(java.lang.String stream, int nmsgs, int ntopics, int npartitions, int nbatches, long sleepms, boolean verify, boolean mflushers, boolean progress, boolean roundrobin, boolean hashkey)static booleanrunTest()static voidusage()
-
-
-
Field Detail
-
streamName
public static java.lang.String streamName
-
topicNames
public static java.lang.String[] topicNames
-
numTopics
public static int numTopics
-
numSlowTopics
public static int numSlowTopics
-
numPartitions
public static int numPartitions
-
numMsgsPerPartition
public static int numMsgsPerPartition
-
numBatches
public static int numBatches
-
batchSleepMs
public static long batchSleepMs
-
multipleFlushers
public static boolean multipleFlushers
-
printProgress
public static boolean printProgress
-
needVerify
public static boolean needVerify
-
roundRobin
public static boolean roundRobin
-
hashKey
public static boolean hashKey
-
totalNumMsgs
public static int totalNumMsgs
-
producer
public static org.apache.kafka.clients.producer.KafkaProducer producer
-
msgValueLength
public static int msgValueLength
-
producerPoolSz
public static long producerPoolSz
-
slowToNormalTopicRatio
public static int slowToNormalTopicRatio
-
checkLag
public static boolean checkLag
-
ignoreErr
public static boolean ignoreErr
-
metadataRefreshMs
public static long metadataRefreshMs
-
-
Method Detail
-
usage
public static void usage()
-
main
public static void main(java.lang.String[] args) throws java.io.IOException- Throws:
java.io.IOException
-
runStressTest
public static boolean runStressTest(java.lang.String stream, int nmsgs, int ntopics, int npartitions, int nbatches, long sleepms, boolean verify, boolean mflushers, boolean progress, boolean roundrobin, boolean hashkey) throws java.io.IOException- Throws:
java.io.IOException
-
runBasicTest
public static boolean runBasicTest(java.lang.String stream, int nmsgs, int ntopics, int slowTopics, int npartitions, int nbatches, long sleepms, boolean mflushers, boolean progress, int msgsz, long poolsz, long metadataMillis) throws java.io.IOException- Throws:
java.io.IOException
-
runTest
public static boolean runTest()
-
-