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
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.
Just to post as an answer - the SparkContext can be accessed from SparkSession using spark.sparkContext
(no parenthesis)