- Apache Spark Deep Learning Cookbook
- Ahmed Sherif Amrith Ravindra
- 50字
- 2025-02-26 11:49:44
How to do it...
This section walks through the steps to initialize and configure a Spark cluster.
- Import SparkSession using the following script:
from pyspark.sql import SparkSession
- Configure SparkSession with a variable named spark using the following script:
spark = SparkSession.builder \
.master("local[*]") \
.appName("GenericAppName") \
.config("spark.executor.memory", "6gb") \
.getOrCreate()