Символ "термин org. apache .spark.annotation" отсутствует в пути к классам (искра kubernetes) - PullRequest
0 голосов
/ 24 апреля 2020

Я использую spark с Kubernetes и сталкиваюсь с проблемой при создании толстого фляги с командой "sbt assembly" с libraryDependencies + = "org. apache .spark" %% "spark-kubernetes"% "2.4.5" в моем build.sbt. Все работает нормально, если я понижаю версию spark kubernetes до «2.4.2», но не до «2.4.5». И в другом случае, когда я заново собираю тот же код, используя сборку sbt после удаления целевой папки, созданной предыдущим sbt команда сборки, затем он начинает работать нормально с той же свечой Kubernetes 2.4.5. Я просто хочу избежать этой многократной сборки jar-файлов сборки, и я также попытался добавить библиотеку spark tags в мой файл build.sbt, но она все еще не работает. Поэтому, пожалуйста, помогите мне с этим вопросом. Я использую spark 2.4.4 и scala 2.11.12 и sbt 1.2.8. Пожалуйста, найдите приложенные журналы.

[error] import org.apache.spark.sql.{SQLContext, SparkSession}
[error]        ^
[error] /d02/scala/sparktest/app/controllers/MainController.scala:92:15: Symbol 'term  org.apache.spark.annotation' is missing from the classpath.
[error] This symbol is required by ' <none>'.
[error] Make sure that term annotation is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
[error] A full rebuild may help if 'SparkSession.class' was compiled against an incompatible version of org.apache.spark.
[error]   var spark = SparkSession.builder().appName("sparktest").config(conf).getOrCreate()
[error]               ^
[error] /d02/scala/sparktest/app/controllers/MainController.scala:94:24: Symbol 'term org.apache.spark.annotation' is missing from the classpath.
[error] This symbol is required by ' <none>'.
[error] Make sure that term annotation is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
[error] A full rebuild may help if 'SQLContext.class' was compiled against an incompatible version of org.apache.spark.
[error]   var sqlContext = new SQLContext(sc)
[error]                        ^
[error] three errors found
[error] (Compile / compileIncremental) Compilation failed.
...