【发布时间】:2019-09-27 07:30:34
【问题描述】:
我在带有 Scala 2.11.8 的 CDH 5.10 集群上使用 Spark 2.2。一切正常,但后来我突然开始在驱动程序代码中得到这个:
Exception in thread "main" java.lang.LinkageError: loader constraint violation: when resolving method
"org.apache.spark.streaming.StreamingContext$.getOrCreate(Ljava/lang/String;Lscala/Function0;Lorg/apache/hadoop/conf/Configuration;Z)Lorg/apache/spark/streaming/StreamingContext;"
the class loader (instance of org/apache/spark/util/ChildFirstURLClassLoader) of the current class, com/hp/hawkeye/driver/StreamingDriver$,
and the class loader (instance of sun/misc/Launcher$AppClassLoader)
for the method's defining class, org/apache/spark/streaming/StreamingContext$,
have different Class objects for the type scala/Function0 used in the signature
有什么办法可以解决这个问题吗?
【问题讨论】:
标签: apache-spark spark-streaming