Explain the architecture of YARN and how it allocates various resources to applications

A client, API, or application connects with the ResourceManager, which subsequently handles resource allocation in the cluster. It is aware of the resources available to each node management. The ResourceManager has two core components: Application Manager and Scheduler. The scheduler is in charge of distributing resources to the many concurrent programmes depending on their requirements. The scheduler, on the other hand, does not keep track of the application’s progress.

If there is a failure, the Application Managers receives job submissions and manages and reboots the application masters. It controls the resource demands of the apps and talks with the scheduler to get the resources required. It communicates with the NodeManager in order to manage and execute the tasks that keep track of the jobs in progress. It also keeps track of the resources used by each container.

A container is made up of several resources such as CPU, RAM, and network bandwidth. It enables programmes to consume a set amount of resources.

As soon as a job is submitted, the ResourceManager sends a request to the NodeManager to hold a few resources to process. The NodeManager then allocates the work to an available container. After that, the ResourceManager launches the application master to handle the execution, which runs in one of the containers specified. The remainder of the available containers is used for the execution procedure. This is the general method through which YARN distributes resources to applications through its architecture.