I am initializing PySpark from within a Jupyter Notebook as follows:
from pyspark import SparkContext
#
conf = SparkConf().setAppName("PySpark-testing-app").setMaster("yarn")
conf = (conf.set("deploy-mode","client")
.set("spark.driver.memory","20g")
.set("spark.executor.memory","20g")
.set("spark.driver.cores","4")
.set("spark.num.executors","6")
.set("spark.executor.cores","4"))
sc = SparkContext(conf=conf)
sqlContext = SQLContext.getOrCreate(sc)
However, when I launch YARN GUI and look into "RUNNING Applications" I see my session being allocated with 1 container, 1 vCPU, and 1GB of RAM, i.e. the default values! Can I get the desired, passing values as listed above?