Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 01-25-2016 07:42 AM
Is there any way to invoke the smoke test for different HDP components using Ambari API ? also can we check the status of smoke test using API ?
Created 01-25-2016 08:18 AM
Yes, there is a POST API call. Check this link for an example - Running-Service-Checks
The above would return a requestID
You can then track (poll) the status of the service check request using a GET call by passing the requestID returned from above call. Something like below:
http://c6401.ambari.apache.org:8080/api/v1/clusters/cl1/requests/<requestID>;
Created 01-25-2016 08:18 AM
Yes, there is a POST API call. Check this link for an example - Running-Service-Checks
The above would return a requestID
You can then track (poll) the status of the service check request using a GET call by passing the requestID returned from above call. Something like below:
http://c6401.ambari.apache.org:8080/api/v1/clusters/cl1/requests/<requestID>;
Created 02-03-2016 04:42 AM
Thank you so much @vsharma
here is the test results
Smoke test
[root@sandbox ~]# curl -u admin:admin -i -H 'X-Requested-By: ambari' -X POST -d '{"RequestInfo": {"context" :"YARN Service Check","command":"YARN_SERVICE_CHECK"},"Requests/resource_filters":[{"service_name":"YARN"}]}' http://127.0.0.1:8080/api/v1/clusters/Sandbox/requestsHTTP/1.1 202
AcceptedUser: adminSet-Cookie:
AMBARISESSIONID=1vg24zix87lkmi53hpjl4krvk;Path=/;HttpOnlyExpires: Thu, 01 Jan
1970 00:00:00 GMTContent-Type:
text/plainVary:
Accept-Encoding, User-AgentContent-Length: 137Server:
Jetty(8.1.17.v20150415){ "href" : "http://127.0.0.1:8080/api/v1/clusters/Sandbox/requests/87", "Requests" : { "id" : 87, "status" : "Accepted" }}[root@sandbox ~]#
Track status of above smoke test
curl -u admin:admin -i -H 'X-Requested-By: ambari' -X GET http://127.0.0.1:8080/api/v1/clusters/Sandbox/requests/87
Note - request number can be found from http://127.0.0.1:8080/api/v1/clusters/Sandbox/requests url, we should pickup the last request id to check the status.