2. ❖ Scope
❖ Zookeeper server start
❖ Kafka server start
❖ Create kafka topic and send message
❖ Consume kafka message
❖ List kafka topics
❖ Kafka producer in java
❖ Kafka consumer in java
❖ Spark CLI
❖ Spark word count java app
❖ Kafka-Spark integration
❖ Dataframes
❖ Create table schema in spark
❖ SQL queries
❖ Front-end design
Contents
3. Scope
❖ Create an application to capture user’s location and send
it to database for real-time data analysis
❖ Demonstrate the use of kafka-spark data streaming for
creation of meaningful analytical reports
15. Kafka Producer
❖ Create KafkaProducer object and initialise it by setting its
required properties.
16. Kafka Producer
❖ Create user object, specify the topic and send the
message using KafkaProducer object
17. Kafka-Spark Integration
❖ Create JavaStreamingContext with interval of 5 seconds
❖ Set kafka topic from which messages are to be
consumed
❖ Create kafka connector for spark
19. Dataframe Read
❖ Create dataframe and show tbl_location data
❖ Register tbl_location as data frame table
20. Spark Table Schema
❖ Create table schema to create a new table in postgresql
using spark
21. Consume kafka data
❖ Consume the data sent from kafka to create data frame
and register it as table
22. SQL Queries
❖ Using sqlContext, query the dataframes
❖ Create table “user-location” in postgresql and save
meaningful consumed data for further processing
23. SQL Queries
❖ Using sqlContext, query the dataframes
❖ Create table “user-institute” in postgresql and save
meaningful consumed data for further processing
24. SQL Queries
❖ Using sqlContext, query the dataframes
❖ Get list of users logged in from India along with state
and city
❖ Create table “user-country” in postgresql and save
meaningful consumed data for further processing