Spark 2.1 Structured Streaming - Using Kakfa as source with Python (pyspark)

前端 未结 1 1517
醉梦人生
醉梦人生 2021-01-23 06:23

With Apache Spark version 2.1, I would like to use Kafka (0.10.0.2.5) as source for Structured Streaming with pyspark:

kafka_app.py:

from pyspark.sql imp         


        
1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-23 06:28

    You need to use sql-structured streaming jar "spark-sql-kafka-0-10_2.11-2.1.0.jar" instead of spark-streaming-kafka-0-10-assembly_2.10-2.1.0.jar.

    0 讨论(0)
提交回复
热议问题