May 2017
Intermediate to advanced
294 pages
7h 33m
English
SparkContext is the first object that a Spark program must create to access the cluster. In spark-shell, it is directly accessible via spark.sparkContext. Here's how you can programmatically create SparkContext in your Scala code:
import org.apache.spark.SparkContextimport org.apache.spark.SparkConfval conf = new SparkConf().setAppName("my app").setMaster("master url")new SparkContext(conf)
Read now
Unlock full access