Apache Kafka(v2.4.0) - Python 中的 Spark (v2.4.4) 流式集成

Apache Kafka(v2.4.0) - Spark (v2.4.4) streaming Integration in Python

所以我在不同的 ubuntu 机器。我想从物联网设备中获取所有数据,输入到 kafka,然后使用 spark-streaming,进入 spark。 我想在 python 完成这一切。 根据这个link:https://spark.apache.org/docs/2.4.4/streaming-kafka-integration.html 由于我的 Kafka 版本超过 0.10,我无法使用 python,因为 python 没有显示示例。是这样吗?或者是否有任何可能的方法来仅使用 python 进行集成?

there is no example shown for python

这并不意味着不可能。

spark.readStream().format("kafka").option(...) 在 Python 中仍然有效,您可以在别处搜索大量 "Structured Streaming Python"

的示例