gpt4 book ai didi

scala - SCALA和Elastic Search:将符号添加到类路径(Databricks)

转载 作者:行者123 更新时间:2023-12-03 01:29:31 25 4
gpt4 key购买 nike

:)

我收到一个我不知道如何解决的错误。我真的找不到关于此SchemaRDD类型以及如何使用它的出色文档。

build.sbt包含:

scalaVersion := "2.11.12"

libraryDependencies += "org.apache.spark" %% "spark-sql" % "2.4.0"
libraryDependencies += "org.scalaj" %% "scalaj-http" % "2.4.1"
libraryDependencies += "io.spray" %% "spray-json" % "1.3.5"
libraryDependencies += "com.amazonaws" % "aws-java-sdk-core" % "1.11.534"
libraryDependencies += "com.amazonaws" % "aws-encryption-sdk-java" % "1.3.6"
libraryDependencies += "com.amazonaws" % "aws-java-sdk" % "1.11.550"
libraryDependencies += "com.typesafe" % "config" % "1.3.4"
libraryDependencies += "org.elasticsearch" %% "elasticsearch-spark-1.2" % "2.4.4"

错误:
Symbol 'type org.apache.spark.sql.SchemaRDD' is missing from the classpath.
[error] This symbol is required by 'value org.elasticsearch.spark.sql.package.rdd'.
[error] Make sure that type SchemaRDD is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
[error] A full rebuild may help if 'package.class' was compiled against an incompatible version of org.apache.spark.sql.

非常感谢您的各种支持! :)

最佳答案

依赖性elasticsearch-spark-1.2适用于Spark 1.x,需要改用elasticsearch-spark-20The latest version是为Spark 2.3构建的

libraryDependencies += "org.elasticsearch" %% "elasticsearch-spark-20" % "7.1.1"

关于scala - SCALA和Elastic Search:将符号添加到类路径(Databricks),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56736742/

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