我的问题的入口是一个异常:
升级Spark后出现了问题。我成功地解决了这个问题,但仍然不理解根本原因。看起来是与Spark依赖有关的问题,请查看以下链接:https://mvnrepository.com/artifact/org.apache.spark/spark-core_2.12/2.4.7。它需要
[info] Cause: com.fasterxml.jackson.databind.JsonMappingException: Incompatible Jackson version: 2.8.4
[info] at com.fasterxml.jackson.module.scala.JacksonModule.setupModule(JacksonModule.scala:64)
[info] at com.fasterxml.jackson.module.scala.JacksonModule.setupModule$(JacksonModule.scala:51)
[info] at com.fasterxml.jackson.module.scala.DefaultScalaModule.setupModule(DefaultScalaModule.scala:19)
[info] at com.fasterxml.jackson.databind.ObjectMapper.registerModule(ObjectMapper.java:745)
[info] at org.apache.spark.rdd.RDDOperationScope$.<init>(RDDOperationScope.scala:82)
[info] at org.apache.spark.rdd.RDDOperationScope$.<clinit>(RDDOperationScope.scala)
[info] at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:152)
[info] at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:127)
[info] at org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:83)
[info] at org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:81)
升级Spark后出现了问题。我成功地解决了这个问题,但仍然不理解根本原因。看起来是与Spark依赖有关的问题,请查看以下链接:https://mvnrepository.com/artifact/org.apache.spark/spark-core_2.12/2.4.7。它需要
com.fasterxml.jackson.core » jackson-databind 2.6.7.3
,没有问题。进一步地,它还需要https://mvnrepository.com/artifact/org.json4s/json4s-jackson_2.12/3.5.3,也没有问题。然而,https://mvnrepository.com/artifact/org.json4s/json4s-jackson_2.12/3.5.3需要https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind/2.8.4。现在,我们可以看到spark-2.4.7
引入了jackson-databind
本身之间的依赖冲突。我的推理哪里出了问题?