Skip to content

Instantly share code, notes, and snippets.

@kevinmeredith
Created April 22, 2017 14:23
Show Gist options
  • Save kevinmeredith/25a9ade2982c89c6f925e5a02ed97fb7 to your computer and use it in GitHub Desktop.
Save kevinmeredith/25a9ade2982c89c6f925e5a02ed97fb7 to your computer and use it in GitHub Desktop.
Trying to use SparkContext from `sbt console`
$mkdir spark_sandbox
$cd spark_sandbox
$cat build.sbt 
scalaVersion := "2.11.8"

libraryDependencies += "org.apache.spark" % "spark-core_2.11" % "2.1.0"
$sbt console
scala> import org.apache.spark.SparkConf
scala> import org.apache.spark.SparkContext
scala> val sc = new SparkConf().setAppName("cust data").setMaster("local[*]")
sc: org.apache.spark.SparkConf = org.apache.spark.SparkConf@13b23911
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment