Support Questions

Find answers, ask questions, and share your expertise

Is there any ambari API to execute "refresh yarn queue's" command ?

avatar

I'm trying to execute the "Refresh yarn queue's" command through ambari API. Unable to find a solution for this. If anybody has any idea please let me know.

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Narendra Neerukonda

Ambari 2.7 you can try following kind of API calls.

# curl -k -H "X-Requested-By: ambari" -u admin:admin  -X POST -d '{"RequestInfo":{"context":"Refresh YARN Capacity Scheduler","command":"REFRESHQUEUES","parameters/forceRefreshConfigTags":"capacity-scheduler"},"Requests/resource_filters":[{"service_name":"YARN","component_name":"RESOURCEMANAGER","hosts":"kerlatest2.example.com,kerlatest4.example.com"}]}' http://kerlatest1.example.com:8080/api/v1/clusters/KerLatest/requests


Please replace the "kerlatest2.example.com,kerlatest4.example.com" with your YARN resource Manager hostnames, also replace the "kerlatest1.example.com:8080" with your Ambari Server hostname and port. And replace the "KerLatest" with your own cluster name.


Following article might give some idea in Kerberized environments:

https://community.hortonworks.com/content/supportkb/151093/how-do-i-refresh-yarn-capacity-scheduler-...

View solution in original post

2 REPLIES 2

avatar
Master Mentor

@Narendra Neerukonda

Ambari 2.7 you can try following kind of API calls.

# curl -k -H "X-Requested-By: ambari" -u admin:admin  -X POST -d '{"RequestInfo":{"context":"Refresh YARN Capacity Scheduler","command":"REFRESHQUEUES","parameters/forceRefreshConfigTags":"capacity-scheduler"},"Requests/resource_filters":[{"service_name":"YARN","component_name":"RESOURCEMANAGER","hosts":"kerlatest2.example.com,kerlatest4.example.com"}]}' http://kerlatest1.example.com:8080/api/v1/clusters/KerLatest/requests


Please replace the "kerlatest2.example.com,kerlatest4.example.com" with your YARN resource Manager hostnames, also replace the "kerlatest1.example.com:8080" with your Ambari Server hostname and port. And replace the "KerLatest" with your own cluster name.


Following article might give some idea in Kerberized environments:

https://community.hortonworks.com/content/supportkb/151093/how-do-i-refresh-yarn-capacity-scheduler-...

avatar

The above question and the reply below was originally posted in the Community Help Track. On Mon Jun 10 12:55 UTC 2019, a member of the HCC moderation staff moved it to the Cloud & Operations track. The Community Help Track is intended for questions about using the HCC site itself.

Bill Brooks, Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.