Package com.mapr.streams.listener
Class Listener
java.lang.Object
com.mapr.streams.listener.Listener
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
ListenerV10
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classstatic enum -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionListener(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, String groupId, int maxPartitionFetchSize, int maxFetchSize, int maxPollRecords) Listener(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, String groupId, int maxPartitionFetchSize, int maxFetchSize, int maxPollRecords, boolean verifyHdrKey, boolean verifyHdrVal) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAddPerPartitonRecs(Hashtable<Listener.PartitionInfo, Long> pMap, Hashtable<Listener.PartitionInfo, Long> pMsgMap, String stName, String tpName, int partition, long recSize) voidvoidprotected longgetHeadersSize(org.apache.kafka.clients.consumer.ConsumerRecord<byte[], byte[]> rec) static voidvoidrun()static booleanrunLGTest(String streamName, int numStreams, int numTopics, int numPartitions, boolean isTracingEnabled, String groupId) static booleanrunTest(String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs) static booleanrunTest(String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs, boolean topicSubscription, boolean keysInOrder, String groupId) static booleanrunTest(String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs, Listener.TED_ACTION action) static booleanrunTest(String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs, String lgGrp) static booleanrunTestWithPollOptions(String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs, int maxPartitionFetchSize, int maxFetchSize, int maxPollRecords) voidstatic voidusage()protected voidverifyHeaders(org.apache.kafka.clients.consumer.ConsumerRecord<byte[], byte[]> rec) protected voidVerifyPollingOrderedKey(String stName, String tpName, int partition, int seq) protected voidVerifyPollingUnorderedKey(String stName, String tpName, int partition, int seq)
-
Field Details
-
topicIntial
-
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 Details
-
Listener
public Listener(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, String groupId, int maxPartitionFetchSize, int maxFetchSize, int maxPollRecords, boolean verifyHdrKey, boolean verifyHdrVal) -
Listener
public Listener(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, String groupId, int maxPartitionFetchSize, int maxFetchSize, int maxPollRecords)
-
-
Method Details
-
usage
public static void usage() -
main
- Throws:
Exception
-
runLGTest
-
runTestWithPollOptions
public static boolean runTestWithPollOptions(String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs, int maxPartitionFetchSize, int maxFetchSize, int maxPollRecords) throws IOException - Throws:
IOException
-
runTest
public static boolean runTest(String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs) throws IOException - Throws:
IOException
-
runTest
public static boolean runTest(String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs, String lgGrp) throws IOException - Throws:
IOException
-
runTest
public static boolean runTest(String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs, Listener.TED_ACTION action) throws IOException - Throws:
IOException
-
runTest
public static boolean runTest(String streamName, int numStreams, int numTopics, int numSlowTopics, int numPartitions, int numExpectedMsgs, boolean topicSubscription, boolean keysInOrder, String groupId) throws IOException - Throws:
IOException
-
run
public void run() -
runWithException
- Throws:
IOException
-
DeleteStream
public void DeleteStream() -
ChangePerm
public void ChangePerm() -
getHeadersSize
protected long getHeadersSize(org.apache.kafka.clients.consumer.ConsumerRecord<byte[], byte[]> rec) throws IOException- Throws:
IOException
-
verifyHeaders
protected void verifyHeaders(org.apache.kafka.clients.consumer.ConsumerRecord<byte[], byte[]> rec) throws IOException- Throws:
IOException
-
VerifyPollingOrderedKey
protected void VerifyPollingOrderedKey(String stName, String tpName, int partition, int seq) throws IOException - Throws:
IOException
-
AddPerPartitonRecs
protected void AddPerPartitonRecs(Hashtable<Listener.PartitionInfo, Long> pMap, Hashtable<Listener.PartitionInfo, Long> pMsgMap, String stName, String tpName, int partition, long recSize) -
VerifyPollingUnorderedKey
protected void VerifyPollingUnorderedKey(String stName, String tpName, int partition, int seq) throws IOException - Throws:
IOException
-