Hi Team,
I am trying to run this simple spark application with the spark submit command.
package org.apache.spark.SparkProgram
/**
- Created by Maheshn on 8/17/2017.
*/
import org.apache.spark.SparkConf
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._object SparkTest {
def main(args: Array[String]): Unit = {val conf = new SparkConf().setAppName("count") val sc = new SparkContext(conf) val list = List("Hello world", "Hello Mahesh howe are you", "Hello s", "sql context is available as sqlcontext") val parallel = sc.parallelize(list) val record = parallel.flatMap(rec => rec.split(" ")).map(rec => (rec, 1)).reduceByKey(_ + _).map(rec => rec.productIterator.mkString("\t")) record.collect().foreach(println) }
}
When i try to run it with below command
spark-submit --class " SparkTest" --master local[4] sparkdemo_2.11-1.0.jar
I encounter classNotFoundException .
Please help .Thank you