Spark Wordcount错误

时间:2017-11-18 22:52:32

标签: eclipse scala apache-spark cloudera-quickstart-vm

我正在使用Cloudera Standalone。我已经下载了Eclipse JDK 8 本地并在Scala中编写了一个wordcount程序: -

import org.apache.spark.SparkConf
import org.apache.spark.SparkContext
object WordCount extends App {
val conf = new SparkConf().setAppName("My Word Count Job") 
val sc = new SparkContext(conf)  
val file = sc.textFile("/spark/fruits.txt")

执行时出错 - >

  

[cloudera @ quickstart~] $ spark-submit --master local --class WordCounts wcspark.jar   线程“main”中的异常java.lang.NoSuchMethodException:

0 个答案:

没有答案