ClickStream Analytics Service
Instructions
- Start ZooKeeper and Apache Kafka.
$ ./$KAFKA_BIN/bin/zookeeper-server-start.sh ./$KAFKA_BIN/config/zookeeper.properties
$ ./$KAFKA_BIN/bin/kafka-server-start.sh ./$KAFKA_BIN/config/server.properties
-
Write the clickstream into the
clickstream
Kafka topic. -
Compile and run the Spark application using
sbt
$ cd stream-analytics-engine
$ sbt compile
$ sbt run
Generate a simulated clickstream
- Compile the
clickstream-simulator
application using maven:
$ cd clickstream-simulator
$ mvn clean compile
$ mvn package
$ ./$KAFKA_BIN/bin/kafka-topics.sh --create \
--topic clickstream \
--bootstrap-server localhost:9092
$ ./$KAFKA_BIN/bin/kafka-topics.sh --list \
--bootstrap-server localhost:9092
- Start a console consumer
$ ./$KAFKA_BIN/bin/kafka-console-consumer.sh --topic clickstream \
--from-beginning \
--bootstrap-server localhost:9092
- Start the clickstream simulator
$ java -jar target/clickstreamproducer-0.1.0.jar