Skip to content

Instantly share code, notes, and snippets.

@danared danared/mongospark
Created Jun 24, 2016

Embed
What would you like to do?
/**
* Gets or creates the Spark Context
*/
def getSparkContext(): SparkContext = {
val conf = new SparkConf()
.setMaster("local[*]")
.setAppName("MovieRatings")
val sc = SparkContext.getOrCreate(conf)
sc.setCheckpointDir("/tmp/checkpoint/")
sc
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.