http://spark.apache.org/docs/latest/programming-guide.html
http://www.openkb.info/2015/01/scala-on-spark-cheatsheet.html
https://www.linkedin.com/pulse/spark-mapreduce-scala-underscore-vishnu-viswanath
http://www.openkb.info/2015/01/scala-on-spark-cheatsheet.html
https://www.linkedin.com/pulse/spark-mapreduce-scala-underscore-vishnu-viswanath
val lines = sc.parallelize(List("a b", "c d","e f","g h","i j","k l"))
val firstwords = lines.map(line => (line.substring(0,line.indexOf(" ")))).collect()
page 14