Queues are the data structures or placeholders for the applications submitted to the YARN cluster. A queue is a logical grouping of applications submitted to the YARN cluster. An application is always submitted to a queue. The scheduler then dequeues the applications based on certain parameters to allocate resources and to initiate application execution.
The basic structure of a queue is defined using an interface org.apache.hadoop.yarn.server.resourcemanager.scheduler.Queue
, as shown in the following diagram:
A queue object contains the following information:
Queue name: This is a name assigned to the queue. In case of hierarchical queues, the complete path to the queue is the name along with the parent queue name. We'll discuss about the hierarchical queues in detail later.
Queue information: YARN defines an abstract class
QueueInfo
to store information related to a queue. It is defined in theorg.apache.hadoop.yarn.api.records
package.