error: object kafka is not a member of package org.apache.spark.streaming

该错误的原因是在 kafka-0-10 版本后 接口发生了变化 官方修改为:kafka010,就是说在原来的基础上需要在kafka后面添加010即可例如:

参考的官方文档链接是:http://spark.apache.org/docs/latest/streaming-kafka-0-10-integration.html

发布了42 篇原创文章 · 获赞 6 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/zkyxgs518/article/details/103179941