Commit cef69991 authored by Sigmund Augdal's avatar Sigmund Augdal

Some sample content for the app (doesn't work yet)

parent 5d730099
package no.uninett
import org.apache.spark.SparkContext
import org.apache.spark.SparkConf
/**
* Hello world!
......@@ -7,6 +9,11 @@ package no.uninett
object App
{
def main(args: Array[String]):Unit={
println( "Hello World!" )
val appName = "scala test"
val conf = new SparkConf().setAppName(appName).setMaster("local")
val sc = new org.apache.spark.SparkContext(conf)
val data = Array(1, 2, 3, 4, 5)
val distData = sc.parallelize(data)
distData.map(x => x + 1).reduce((x, y) => x + y)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment