I\'m running a spark batch job and uses SparkSession as I need a lot of spark-sql features to process in each of my components. The SparkContext is in
SparkSession
SparkContext
The sparkContext field does not seem to be public anymore(I am using Spark 2.3.2), however, you can retreive it using a method of the same name:
spark.sparkContext()
This is applicable to Spark Java only.