#curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE :8080/api/v1/clusters/beta_eu/services/APPCONFIGURATION
{
"status" : 500,
"message" : "org.apache.ambari.server.controller.spi.SystemException: An internal system exception occurred: Cannot remove beta_eu/APPCONFIGURATION. One or more host components are in a non-removable state."
4. 停止service
[root@ip-10-21-23-29 ~]# curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"Stop Service"},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' 10.21.23.29:8080/api/v1/clusters/beta_eu/services/APPCONFIGURATION
{ "href" : "http://10.21.23.29:8080/api/v1/clusters/beta_eu/requests/24",
"Requests" : {
"id" : 24,
"status" : "Accepted" }
5. 删除service
[root@ip-10-21-23-29 ~]#curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE :8080/api/v1/clusters/beta_eu/services/APPCONFIGURATION
6. 再次检查,已经没有service了
[root@ip-10-21-23-29 ~]# curl -u admin:admin -H “X-Requested-By: ambari” -X GET :8080/api/v1/clusters/beta_eu/services/
curl: (6) Couldn't resolve host 'ambari”'
{
"href" : "http://10.21.23.29:8080/api/v1/clusters/beta_eu/services/",
"items" : [ ]