Class Listener

  • All Implemented Interfaces:
    java.lang.Runnable
    Direct Known Subclasses:
    ListenerV10

    public class Listener
    extends java.lang.Object
    implements java.lang.Runnable
    • Constructor Summary

      Constructors 
      Constructor Description
      Listener​(java.lang.String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs, boolean verifyKeys, boolean keysInOrder, boolean allowDuplicateKeys, boolean isTracingEnabled, boolean printStats, Listener.TED_ACTION action, boolean topicSubscription, java.lang.String groupId, int maxPartitionFetchSize, int maxFetchSize, int maxPollRecords)  
      Listener​(java.lang.String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs, boolean verifyKeys, boolean keysInOrder, boolean allowDuplicateKeys, boolean isTracingEnabled, boolean printStats, Listener.TED_ACTION action, boolean topicSubscription, java.lang.String groupId, int maxPartitionFetchSize, int maxFetchSize, int maxPollRecords, boolean verifyHdrKey, boolean verifyHdrVal)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void AddPerPartitonRecs​(java.util.Hashtable<Listener.PartitionInfo,​java.lang.Long> pMap, java.util.Hashtable<Listener.PartitionInfo,​java.lang.Long> pMsgMap, java.lang.String stName, java.lang.String tpName, int partition, long recSize)  
      void ChangePerm()  
      void DeleteStream()  
      protected long getHeadersSize​(org.apache.kafka.clients.consumer.ConsumerRecord<byte[],​byte[]> rec)  
      static void main​(java.lang.String[] args)  
      void run()  
      static boolean runLGTest​(java.lang.String streamName, int numStreams, int numTopics, int numPartitions, boolean isTracingEnabled, java.lang.String groupId)  
      static boolean runTest​(java.lang.String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs)  
      static boolean runTest​(java.lang.String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs, boolean topicSubscription, boolean keysInOrder, java.lang.String groupId)  
      static boolean runTest​(java.lang.String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs, Listener.TED_ACTION action)  
      static boolean runTest​(java.lang.String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs, java.lang.String lgGrp)  
      static boolean runTestWithPollOptions​(java.lang.String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs, int maxPartitionFetchSize, int maxFetchSize, int maxPollRecords)  
      void runWithException()  
      static void usage()  
      protected void verifyHeaders​(org.apache.kafka.clients.consumer.ConsumerRecord<byte[],​byte[]> rec)  
      protected void VerifyPollingOrderedKey​(java.lang.String stName, java.lang.String tpName, int partition, int seq)  
      protected void VerifyPollingUnorderedKey​(java.lang.String stName, java.lang.String tpName, int partition, int seq)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • topicIntial

        public static java.lang.String topicIntial
      • streamName

        protected java.lang.String streamName
      • numStreams

        protected int numStreams
      • verifyKeys

        protected boolean verifyKeys
      • verifyHeaderKey

        protected boolean verifyHeaderKey
      • verifyHeaderVal

        protected boolean verifyHeaderVal
      • keysInOrder

        protected boolean keysInOrder
      • isTracingEnabled

        protected boolean isTracingEnabled
      • status

        protected boolean status
    • Constructor Detail

      • Listener

        public Listener​(java.lang.String streamName,
                        int numStreams,
                        int numTopics,
                        int numSlowTopics,
                        int numPartitions,
                        int numExpectedMsgs,
                        boolean verifyKeys,
                        boolean keysInOrder,
                        boolean allowDuplicateKeys,
                        boolean isTracingEnabled,
                        boolean printStats,
                        Listener.TED_ACTION action,
                        boolean topicSubscription,
                        java.lang.String groupId,
                        int maxPartitionFetchSize,
                        int maxFetchSize,
                        int maxPollRecords,
                        boolean verifyHdrKey,
                        boolean verifyHdrVal)
      • Listener

        public Listener​(java.lang.String streamName,
                        int numStreams,
                        int numTopics,
                        int numSlowTopics,
                        int numPartitions,
                        int numExpectedMsgs,
                        boolean verifyKeys,
                        boolean keysInOrder,
                        boolean allowDuplicateKeys,
                        boolean isTracingEnabled,
                        boolean printStats,
                        Listener.TED_ACTION action,
                        boolean topicSubscription,
                        java.lang.String groupId,
                        int maxPartitionFetchSize,
                        int maxFetchSize,
                        int maxPollRecords)
    • Method Detail

      • usage

        public static void usage()
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • runLGTest

        public static boolean runLGTest​(java.lang.String streamName,
                                        int numStreams,
                                        int numTopics,
                                        int numPartitions,
                                        boolean isTracingEnabled,
                                        java.lang.String groupId)
      • runTestWithPollOptions

        public static boolean runTestWithPollOptions​(java.lang.String streamName,
                                                     int numStreams,
                                                     int numTopics,
                                                     int numSlowTopics,
                                                     int numPartitions,
                                                     int numExpectedMsgs,
                                                     int maxPartitionFetchSize,
                                                     int maxFetchSize,
                                                     int maxPollRecords)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • runTest

        public static boolean runTest​(java.lang.String streamName,
                                      int numStreams,
                                      int numTopics,
                                      int numSlowTopics,
                                      int numPartitions,
                                      int numExpectedMsgs)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • runTest

        public static boolean runTest​(java.lang.String streamName,
                                      int numStreams,
                                      int numTopics,
                                      int numSlowTopics,
                                      int numPartitions,
                                      int numExpectedMsgs,
                                      java.lang.String lgGrp)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • runTest

        public static boolean runTest​(java.lang.String streamName,
                                      int numStreams,
                                      int numTopics,
                                      int numSlowTopics,
                                      int numPartitions,
                                      int numExpectedMsgs,
                                      Listener.TED_ACTION action)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • runTest

        public static boolean runTest​(java.lang.String streamName,
                                      int numStreams,
                                      int numTopics,
                                      int numSlowTopics,
                                      int numPartitions,
                                      int numExpectedMsgs,
                                      boolean topicSubscription,
                                      boolean keysInOrder,
                                      java.lang.String groupId)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • runWithException

        public void runWithException()
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • DeleteStream

        public void DeleteStream()
      • ChangePerm

        public void ChangePerm()
      • getHeadersSize

        protected long getHeadersSize​(org.apache.kafka.clients.consumer.ConsumerRecord<byte[],​byte[]> rec)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • verifyHeaders

        protected void verifyHeaders​(org.apache.kafka.clients.consumer.ConsumerRecord<byte[],​byte[]> rec)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • VerifyPollingOrderedKey

        protected void VerifyPollingOrderedKey​(java.lang.String stName,
                                               java.lang.String tpName,
                                               int partition,
                                               int seq)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • AddPerPartitonRecs

        protected void AddPerPartitonRecs​(java.util.Hashtable<Listener.PartitionInfo,​java.lang.Long> pMap,
                                          java.util.Hashtable<Listener.PartitionInfo,​java.lang.Long> pMsgMap,
                                          java.lang.String stName,
                                          java.lang.String tpName,
                                          int partition,
                                          long recSize)
      • VerifyPollingUnorderedKey

        protected void VerifyPollingUnorderedKey​(java.lang.String stName,
                                                 java.lang.String tpName,
                                                 int partition,
                                                 int seq)
                                          throws java.io.IOException
        Throws:
        java.io.IOException