Skip to content
Ved Prakash Singh edited this page Jan 27, 2016 · 34 revisions

Welcome to the spark-tutorial wiki!

We are using SparkCommon from Utils package to run the Examples of in this tutorial.

object SparkCommon {

  lazy val conf = {
    new SparkConf(false)
      .setMaster("local[*]")
      .setAppName("Spark Tutorial")
  }

  lazy val sparkContext = new SparkContext(conf)
  lazy val sparkSQLContext = SQLContext.getOrCreate(sparkContext)
  lazy val streamingContext = StreamingContext.getActive()
    .getOrElse(new StreamingContext(sparkContext, Seconds(2)))

}
Clone this wiki locally