Created
June 24, 2016 14:41
-
-
Save danared/033ce73fa54f2d3cf8a8ee7c851aaf11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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