gpt4 book ai didi

elasticsearch - 如何将Elasticsearch-Hadoop依赖项导入Spark脚本

转载 作者:行者123 更新时间:2023-12-02 22:16:53 25 4
gpt4 key购买 nike

我试图通过将Build.scala文档设置为使用spark-es connector:

libraryDependencies ++= Seq(
"com.datastax.spark" %% "spark-cassandra-connector" % "1.2.1",
"org.elasticsearch" %% "elasticsearch-hadoop" % "2.2.0"
)

但是我得到了错误:
[error] (*:update) sbt.ResolveException: unresolved dependency: org.elasticsearch#elasticsearch-hadoop_2.10;2.2.0: not found

我可以看到它存在 here ...

编辑:

当我将Build.scala更改为:
"org.elasticsearch" % "elasticsearch-hadoop" % "2.2.0"

我收到以下错误:
[error] impossible to get artifacts when data has not been loaded. IvyNode = org.scala-lang#scala-library;2.10.3
java.lang.IllegalStateException: impossible to get artifacts when data has not been loaded. IvyNode = org.scala-lang#scala-library;2.10.3

怎么了?

最佳答案

elasticsearch-hadoop不是Scala依赖项,因此它没有Scala特定版本,因此不能与%%一起使用。尝试

"org.elasticsearch" % "elasticsearch-hadoop" % "2.2.0"

关于elasticsearch - 如何将Elasticsearch-Hadoop依赖项导入Spark脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37528993/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com