September 2018
Intermediate to advanced
398 pages
9h 43m
English
If you are not already familiar with Spark, it can be a bit intimidating to write Spark jobs straight away. To make it easier, we are first going to explore the API using a Scala console. Start a new Scala console (Ctrl + Shift + D in IntelliJ), and type the following code:
import org.apache.spark.sql.SparkSessionval spark = SparkSession.builder().master("local[*]").getOrCreate()import spark.implicits._
This will initialize a new Spark session and bring some handy implicit in scope. The master "local[*]" URL means that we will use all of the cores available on the localhost when running jobs.
The Spark session is available to accept new jobs. Let's use it to create Dataset containing a single ...
Read now
Unlock full access