from pyspark import SparkConf conf = SparkConf().setAppName("myApp").setMaster("local")
from pyspark import SparkConf conf = SparkConf().setAppName("myApp").setMaster("spark://localhost:7077")
from pyspark import SparkConf conf = SparkConf().setAppName("myApp").setMaster("yarn")This sets the master to connect to a Spark cluster run on Hadoop YARN. The PySpark package library used in these examples is "pyspark".