参考:https://blog.csdn.net/weixin_40137479/article/details/80320324
new SparkContext(conf)发生错误:
Exception in thread "main" java.lang.NoSuchMethodError: scala.Predef$.refArrayOps([Ljava/lang/Object;)Lscala/collection/mutable/ArrayOps; at org.apache.spark.util.Utils$.getCallSite(Utils.scala:1306) at org.apache.spark.SparkContext.<init>(SparkContext.scala:82) at makeRDDDemo$.main(makeRDDDemo.scala:9) at makeRDDDemo.main(makeRDDDemo.scala)
解决办法:将Scala2.11.x更换为Scala2.10.x
File –> Other Settings –> Default Project Structure –> Global Library
原文地址:https://www.cnblogs.com/144823836yj/p/10923581.html
时间: 2024-11-11 14:29:12