Hadoop YARN: Get a list of available queues

foglerit picture foglerit · Feb 17, 2017 · Viewed 8.8k times · Source

Is there a way to get a list of all available YARN queues from the command line, without resorting to parsing the capacity-scheduler.xml file?

I'm using Hadoop version 2.7.2

Answer

Baptiste Mille-Mathias picture Baptiste Mille-Mathias · Apr 11, 2019

You can use the hadoop builtin mapred command-line tool

[email protected]$ mapred queue -list
======================
Queue Name : root.tenant1
Queue State : running
Scheduling Info : Capacity: 0.0, MaximumCapacity: UNDEFINED, CurrentCapacity: 0.0
    ======================
    Queue Name : root.tenant1.default
    Queue State : running
    Scheduling Info : Capacity: 0.0, MaximumCapacity: UNDEFINED, CurrentCapacity: 0.0
    ======================
    Queue Name : root.tenant1.users
    Queue State : running
    Scheduling Info : Capacity: 0.0, MaximumCapacity: UNDEFINED, CurrentCapacity: 0.0
======================
Queue Name : root.tenant2
Queue State : running
Scheduling Info : Capacity: 0.0, MaximumCapacity: UNDEFINED, CurrentCapacity: 0.0
    ======================
    Queue Name : root.tenant2.default
    Queue State : running
    Scheduling Info : Capacity: 0.0, MaximumCapacity: UNDEFINED, CurrentCapacity: 0.0
    ======================
    Queue Name : root.tenant2.users
    Queue State : running
    Scheduling Info : Capacity: 0.0, MaximumCapacity: UNDEFINED, CurrentCapacity: 0.0
======================

it provides a simple and nice output with hierarchy