我正在尝试使用RedisLabs提供的spark-redis连接器。我可以在本地环境中尝试,下载必要的jar文件。
但是当我尝试在EMR中执行它时,我需要将其添加到我的build.sbt文件中,如下所示:
libraryDependencies += "redis.clients" % "jedis" % "2.9.0"
libraryDependencies += "org.apache.commons" % "commons-pool2" % "2.5.0"
libraryDependencies += "RedisLabs" % "spark-redis" % "0.3.2"
但是我收到一个错误消息,说不能解决该依赖性。无法找到spark-redis库。
还有其他方法吗?有什么建议吗?
答案 0 :(得分:3)
我能够进行编译,从而将火花流添加到依赖项中,并包括从外部URL进行火花流的依赖项:
libraryDependencies += "org.apache.spark" %% "spark-streaming" % "2.3.0" % "provided"
libraryDependencies += "redis.clients" % "jedis" % "2.9.0"
libraryDependencies += "org.apache.commons" % "commons-pool2" % "2.5.0"
libraryDependencies += "RedisLabs" % "spark-redis" % "0.3.2" from "https://dl.bintray.com/spark-packages/maven/RedisLabs/spark-redis/0.3.2/spark-redis-0.3.2.jar"