Yet Another Resource Negotiator (YARN) is Hadoop's compute framework that runs on top of HDFS, which is Hadoop's storage layer.
YARN follows the master-slave architecture. The master daemon is called ResourceManager and the slave daemon is called NodeManager. Besides this application, life cycle management is done by ApplicationMaster, which can be spawned on any slave node and would be alive during the lifetime of an application.
When Spark is run on YARN, ResourceManager performs the role of the Spark master and NodeManagers works as executor nodes.
While running Spark with YARN, each Spark executor is run as a YARN container.


