ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juanjo Marron <juanjo.mar...@yahoo.com>
Subject Re: REST API operations completed
Date Thu, 09 Jul 2015 17:37:50 GMT
Hi Alejandro,

Great Thanks!

That was actually our approach

Best regards, 

Juanjo Marron
 


     On Thursday, July 9, 2015 10:22 AM, Alejandro Fernandez <afernandez@hortonworks.com>
wrote:
   

 You have to keep polling for the request id until it completes.
curl -X POST -u admin:admin -H 'X-Requested-By:1' http://c6401.ambari.apache.org:8080/api/v1/clusters/c1/requests
-d '{"RequestInfo":{"context":"YARN Service Check","command":"YARN_SERVICE_CHECK"},"Requests/resource_filters":[{"service_name":"YARN"}]}'
{  "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c1/requests/12",  "Requests"
: {    "id" : 12,    "status" : "Accepted"  }}%

curl -X GET -u admin:admin -H 'X-Requested-By:1' http://c6401.ambari.apache.org:8080/api/v1/clusters/c1/requests/12
| grep request_status    "request_status" : "COMPLETED",
Thanks,Alejandro
From: Juanjo Marron <juanjo.marron@yahoo.com>
Reply-To: Ambari User <user@ambari.apache.org>, Juanjo Marron <juanjo.marron@yahoo.com>
Date: Thursday, July 9, 2015 at 9:25 AM
To: Ambari User <user@ambari.apache.org>
Subject: REST API operations completed

Hi all,

Is there a backend way to be notified when an Ambari operation (such as running a service
check or restart) has finished?
Or is there a way to run a service check from the backend using REST API command, but it returns
the result of the service check only after it completes?

When using REST API command to run a service check, we are instantly given info regarding
that service check, instead of receiving that info after it completes.

Other then constantly checking that request using a REST API command, is there a way to know
when the Ambari operation has completed?

Thanks for your time




  
Mime
View raw message