2017-09-15 44 views
0

我试图在build.sbt中使用以下依赖项,但它一直给出“未解决的依赖性”问题。SBT中Spark-Streaming和Twiter-Streaming的依赖关系

libraryDependencies += "org.apache.bahir" %% "spark-streaming-twitter_2.11" % "2.2.0.1.0.0-SNAPSHOT" 
libraryDependencies += "org.apache.spark" %% "spark-streaming" % "2.2.0" 

我正在使用Spark 2.2.0。什么是正确的依赖关系?

回答

0

下面是您需要为Spark-Twitter Streaming添加的依赖关系。

<dependency> 
    <groupId>org.apache.spark</groupId> 
    <artifactId>spark-streaming_2.11</artifactId> 
    <version>2.0.0</version> 
</dependency> 
<dependency> 
    <groupId>org.apache.bahir</groupId> 
    <artifactId>spark-streaming-twitter_2.11</artifactId> 
    <version>2.0.0</version> 
</dependency> 
<dependency> 
    <groupId>org.twitter4j</groupId> 
    <artifactId>twitter4j-core</artifactId> 
    <version>4.0.4</version> 
    </dependency> 
<dependency> 
    <groupId>org.twitter4j</groupId> 
    <artifactId>twitter4j-stream</artifactId> 
    <version>4.0.4</version> 
    </dependency > 
<dependency> 
    <groupId>com.twitter</groupId> 
    <artifactId>jsr166e</artifactId> 
    <version>1.1.0</version> 
</dependency> 
+0

这实际上并不幸运。有没有其他理由可以说明我为什么一直这样做? – TheShark