@Anurag Mishra There are two deploy modes that can be used to launch Spark applications on YARN. In
cluster mode, the Spark driver runs inside an application master process which is managed by YARN on the cluster, and the client can go away after initiating the application. In
client mode, the driver runs in the client process, and the application master is only used for requesting resources from YARN.
ref: https://spark.apache.org/docs/latest/running-on-yarn.html for more details.