Word Count Algorithm will show the words in a sentence and number of times it have occurred.
User Region Algorithm will show the regions and number of times they have occurred (atleast 2 times, all regions whose occurrence is less than 2 are not displayed).
Anomaly Detection algo will detect and print the names of the user if the user has accessed 3 times or more within a windowed time of 1 minute.
./kafka-console-producer.sh --broker-list localhost:9092 --topic topic1
Hola
Hola
Hello
./kafka-console-consumer.sh --bootstrap-server localhost:9092
--topic topic2
--from-beginning
--formatter kafka.tools.DefaultMessageFormatter
--property print.key=true
--property print.value=true
--property key.deserializer=org.apache.kafka.common.serialization.StringDeserializer
--property value.deserializer=org.apache.kafka.common.serialization.LongDeserializer
Hola 2 Hello 1
./kafka-console-producer.sh --broker-list localhost:9092 --topic topic1 --property parse.key=true --property key.separator=,
lakshay,India
ankit,India
manan,India
karna,India
Jack,England
paanshul,India
./kafka-console-consumer.sh --topic topic2 --from-beginning
--zookeeper localhost:2181
--property print.key=true
--property value.deserializer=org.apache.kafka.common.serialization.LongDeserializer
India, 5
> ./kafka-console-producer.sh --broker-list localhost:9092 --topic topic1
> lakshay
> lakshay
> lakshay
> johnson
> johnson
> morkel
> ./kafka-console-consumer.sh --topic topic2 --from-beginning --new-consumer --bootstrap-server localhost:9092
--property print.key=true --property value.deserializer=org.apache.kafka.common.serialization.LongDeserializer
> lakshay 3