Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is appName in SparkContext constructor and what is the usage of it?

I am new to Spark and I got a little confusion on this appName that is given next to master url. I have searched it through the internet but unable to pick up a clear answer. Online articles mentioned that the appName cannot be changed once it is created. So if there is only one sparkcontext is available for a single jvm what is appNames real usage....?

Can anybody clearly explain this to me.

thanks

like image 676
Dilee Avatar asked Dec 05 '25 05:12

Dilee


1 Answers

Spark architecture has multiple components such as below.

  • Driver program: This the your bundled jar application which drives the entire application. The Driver talks to an instance of Spark Master to submit your job to the cluster

  • Spark Master: The Master acts as the single point of contact of the Cluster for the driver program. It allocates the necessary resources for the application to run which it does by negotiating with cluster manager.

  • Executors/workers: They are the workhorse in the system that actually processes your Dataframes/RDDs ie. your distributed data.

A Spark Master might be handling multiple jobs submitted by multiple driver applications concurrently. To monitor/track your specific application among hundreds of other applications running in the cluster you need an identifier. This is where appName will be helpful.

like image 127
rogue-one Avatar answered Dec 08 '25 10:12

rogue-one



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!