Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Big Data Hadoop & Spark by (11.4k points)

I'm trying to get the path to spark.worker.dir for the current sparkcontext.

1 Answer

0 votes
by (32.3k points)

Yes, I would suggest you to try the method below in order to get the current spark context settings.

SparkConf.getAll()

as accessed by

SparkContext.sc._conf

Another method specifically for Spark 2.1+

spark.sparkContext.getConf().getAll() 

where spark is your sparksession (gives you a dict with all configured settings)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...