Skip to content

Instantly share code, notes, and snippets.

@arahuja
Created June 9, 2015 21:08
Show Gist options
  • Save arahuja/a71b518e5f09725b9d86 to your computer and use it in GitHub Desktop.
Save arahuja/a71b518e5f09725b9d86 to your computer and use it in GitHub Desktop.
import org.apache.spark.{SparkContext, SparkConf}
object SimpleSparkApp extends App {
override def main(args: Array[String]) = {
val config: SparkConf = new SparkConf()
config.setMaster("local[4]")
config.setAppName("MySimpleSparkApp")
val sc = new SparkContext(config)
val rows = Seq( Seq("item-1-1", "item-1-2"), Seq("item-1-1", "item-2-2"))
val rdd = sc.parallelize(rows)
println(rdd.count())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment