sbt未解决的火花流Kafka集成依赖

时间:2017-08-30 12:39:58

标签: scala sbt spark-streaming spark-streaming-kafka

我想使用Kafka集成进行Spark流式传输。我使用Spark版本2.0.0。

但是我得到了一个未解决的依赖错误(“unresolved dependency:org.apache.spark#spark-sql-kafka-0-10_2.11; 2.0.0:not found”)。

如何访问此软件包?或者我做错了什么/丢失了?

我的build.sbt文件:

name := "Spark Streaming"
version := "0.1"
scalaVersion := "2.11.11"
val sparkVersion = "2.0.0"

libraryDependencies ++= Seq(
    "org.apache.spark" %% "spark-core" % sparkVersion,
    "org.apache.spark" %% "spark-sql" % sparkVersion,
    "org.apache.spark" %% "spark-streaming" % sparkVersion,
    "org.apache.spark" %% "spark-sql-kafka-0-10" % sparkVersion
)
libraryDependencies += "org.apache.spark" % "spark-streaming_2.11" % "2.0.0-preview"

谢谢你的帮助。

1 个答案:

答案 0 :(得分:2)

https://mvnrepository.com/artifact/org.apache.spark/spark-streaming-kafka-0-10_2.11

libraryDependencies += "org.apache.spark" % "spark-streaming-kafka-0-10_2.11" % "2.0.0"