spark submit throws an error java.lang.ClassNotFoundException: scala.runtime.java8.JFunction2$mcIII$sp

后端 未结 3 542
执念已碎
执念已碎 2021-01-21 13:59

I wrote a code for word count but when I tried running it from CMD in windows using below command it throws an exception.

spark-submit --class com.sample.WordCou         


        
3条回答
  •  遇见更好的自我
    2021-01-21 14:05

    looks like you are using 2.4.x with Scala 2.12. It might be compatibility issue. Spark documentation reference:- Spark runs on Java 8+, Python 2.7+/3.4+ and R 3.1+. For the Scala API, Spark 2.4.0 uses Scala 2.11. You will need to use a compatible Scala version (2.11.x).

提交回复
热议问题