【问题标题】:Spark streaming reading azure event hub - error compilingSpark 流式读取 azure 事件中心 - 编译错误
【发布时间】:2019-07-26 07:35:44
【问题描述】:

我正在尝试使用 spark 读取 azure 事件中心,但在 intellij 中编译时出现以下错误

Error:scalac: bad symbolic reference to org.apache.http.annotation.Experimental encountered in class file 'EventHubsConf.class'.
Cannot access type Experimental in package org.apache.http.annotation. The current classpath may be
missing a definition for org.apache.http.annotation.Experimental, or EventHubsConf.class may have been compiled against a version that's
incompatible with the one found on the current classpath.

我确保 Intellij 中的编译器指向 SCALA 11.0 库,因为我在 Global SDK 中看到了 scala 12.7 库

以下是我的设置:

name := "xxxxx"

version := "0.1"

scalaVersion := "2.11.0"


libraryDependencies ++= Seq(

  // Spark
  "org.apache.spark" %% "spark-core" % "2.4.0",
  "org.apache.spark" %% "spark-sql" % "2.4.0",
  "org.apache.spark" %% "spark-streaming" % "2.4.0",

  "com.microsoft.azure" % "azure-eventhubs-spark_2.11" % "2.3.10"
)

感谢任何帮助。

谢谢!

【问题讨论】:

    标签: apache-spark intellij-idea azure-eventhub


    【解决方案1】:

    只是对应的库没有在外部库中更新。我不得不手动添加它并开始工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-12-26
      • 2018-06-02
      • 1970-01-01
      • 1970-01-01
      • 2017-03-21
      • 1970-01-01
      • 2021-03-21
      • 2023-01-30
      相关资源
      最近更新 更多