Use this as a starter template for writing Spark applications.
build.sbt
with required dependenciesassembly.sbt
link to assembly pluginWordCount
spark applicationWordCountSpec
test suite for Spark
You would need sbt installed on your system to build the application:
sbt package
To build an uber-jar:
sbt assembly
sbt test
spark-submit --class com.cloudwick.spark.WordCountRunner \
--master "local[*]" \
target/scala-2.10/spark-starter_2.10-1.0.jar \
[input_path] \
[output_path]
spark-submit --class com.cloudwick.spark.WordCountRunner \
--master "local[*]" \
[path_to_jar]/spark-starter_2.10-1.0.jar \
[input_path] \
[output_path]
Assuming you have copied the jar file to the gateway node from where you will be submitting the spark job from.