Search code examples
hadoophadoop-yarn

Hadoop YARN: Get a list of available queues


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


Solution

  • One way is to use ResourceManager REST API, for example:

    curl '<resourcemanager_host>:<http_port>/ws/v1/cluster/scheduler' | jq '.scheduler.schedulerInfo.queues.queue[] | .queueName’
    

    will list all top level queues.

    curl '<resourcemanager_host>:<http_port>/ws/v1/cluster/scheduler' | jq .
    

    gives you all kind of information about scheduler/queues, thus using jq you can get any information out of it.