Support Questions

Find answers, ask questions, and share your expertise

command to list all the yarn queues

avatar

is there cli command to list all the yarn queues , however I can check queues from the ambari . but is there command i can check with that ?

2 REPLIES 2

avatar
Master Mentor

@Anurag Mishra

You can use Ambari CS view or RM UI.

Usng command line if you want to get the details then you might want to try the following , however you will have to parse the output a bit

# curl http://$ResourceManager_Address:8088/ws/v1/cluster/scheduler | grep --color 'queueName'

.

avatar
Master Mentor

@Anurag Mishra

Something like this:

# curl -s http://hdfcluster3.example.com:8088/ws/v1/cluster/scheduler | grep 'queueName' | python -c "import sys, json; print json.load(sys.stdin)['scheduler']['schedulerInfo']['queues']['queue'][0]['queueName']"

# curl -s http://hdfcluster3.example.com:8088/ws/v1/cluster/scheduler | grep 'queueName' | python -c "import sys, json; print json.load(sys.stdin)['scheduler']['schedulerInfo']['queues']['queue'][1]['queueName']"

# curl -s http://hdfcluster3.example.com:8088/ws/v1/cluster/scheduler | grep 'queueName' | python -c "import sys, json; print json.load(sys.stdin)['scheduler']['schedulerInfo']['queues']['queue'][2]['queueName']"

Using a simple Shell script we can keep increasing the index in the same Curl command like

['queue'][3], ['queue'][4]

.