Step 1 - Importing necessary libraries and creating a Spark session

We need to import a Spark session so that we can create the Spark session, the gateway of our Spark app:

import org.apache.spark.sql.SparkSession 
val spark: SparkSession = SparkSession 
    .builder() 
    .appName("MovieSimilarityApp") 
    .master("local[*]") 
    .config("spark.sql.warehouse.dir", "E:/Exp/") 
    .getOrCreate() 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset