Skip to content

szczepanja/spark-submit-kafka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

spark-submit-kafka

Exercise

Write spark structured streaming application that will:

  • run on command line (spark-submit)
  • read records from topic (args(0) - from kafka to console)
  • write it down the screen
  1. Run zookeeper:
    bin/zookeeper-server-start.sh config/zookeeper.properties
  1. Run kafka server:
    bin/kafka-server-start.sh config/server.properties
  1. Run kafka console producer:
    bin/kafka-console-producer.sh --topic <topic-name> --bootstrap-server :9092
  1. Run spark server:
    bin/spark-submit --packages org.apache.spark:spark-sql-kafka-0-10_2.12:3.2.1 <path/to/project.jar>

Write messages from kafka producer console and watch displayed data frame in spark server console. Enjoy!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages