Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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

Solved Go to solution
Highlighted

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

New Contributor

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

Accepted Solutions

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

Super 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-...

2 REPLIES 2

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

Super 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-...

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

Community Manager

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 Manager
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.
Don't have an account?
Coming from Hortonworks? Activate your account here