Skip to content

Instantly share code, notes, and snippets.

@dgadiraju
Created September 11, 2019 15:50
Show Gist options
  • Save dgadiraju/d1a62d339c78898926dc3e5cd9e2ba63 to your computer and use it in GitHub Desktop.
Save dgadiraju/d1a62d339c78898926dc3e5cd9e2ba63 to your computer and use it in GitHub Desktop.
import com.typesafe.config.ConfigFactory
import org.apache.spark.{SparkConf, SparkContext}
val props = ConfigFactory.load()
val envProps = props.getConfig("dev")
val conf = new SparkConf().
setAppName("sbt console").
setMaster(envProps.getString("execution.mode"))
conf.
getAll.
foreach(println)
val sc = new SparkContext(conf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment