Class ProducerPerformance


  • public class ProducerPerformance
    extends java.lang.Object
    • 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
    • Constructor Detail

      • ProducerPerformance

        public ProducerPerformance()
    • 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()