I have written word count scala-script in a text file and saved it in home directory
how can i call and execute wordcount.txt
spark-submit wordcount.txt is not working
wordcount.txt
val text = sc.textFile("/data/mr/wordcount/big.txt");
val counts = text.flatMap(line => line.split(" "))
.map(word => (word.toLowerCase(),1))
.reduceByKey(+)
.sortBy(_._2,false)
.saveAsTextFile(“count_output”);