Created on 03-22-2017 01:53 PM - edited 09-16-2022 04:18 AM
Created on 03-22-2017 02:35 PM - edited 08-18-2019 03:46 AM
Created 03-22-2017 01:58 PM
Yes, Either you can remove the services from Ambari UI as following:
Ambari UI --> Ambari Metrics Collector (Or any service that you want to delete) --> Service Action (Drop down menu) --> "Delete Service" (Button)
.
Or use the Ambari Rest API to do the same : https://cwiki.apache.org/confluence/display/AMBARI/Using+APIs+to+delete+a+service+or+all+host+compon...
-
Here is an example removing METRICS_COLLECTOR from a host.
# curl -u admin -H "X-Requested-By: ambari" -X DELETE http://<AMBARI_HOST>:8080/api/v1/clusters/<CLUSTERNAME>/hosts/hdmdup0002.machine.test.group/host_com...
- Which version of ambari are you using that also matters. Because you can delete services from ambari UI from Ambari 2.4.x version else you will have to use the Rest API as mentioned in the above link.
Created 03-22-2017 02:21 PM
Hi Jay thanks a lot for the help but i cant find any option to remove the services in Ambari UI..
Created 03-22-2017 03:32 PM
As mentioned earlier that you can delete services from ambari UI from Ambari 2.4.x version else you will have to use the Rest API as mentioned in the above link.
In Ambari 2.2.1 that feature is not available in ambari UI. So you will need to either use the Ambari API or more simplest way is to delete the service directly from the Database as mentioned in the following article.
.
(Easiest and quick option) Deleting Service entry directly from Database using the following query:
delete from hostcomponentstate where service_name = 'KNOX'; delete from hostcomponentdesiredstate where service_name = 'KNOX'; delete from servicecomponentdesiredstate where service_name = 'KNOX'; delete from servicedesiredstate where service_name = 'KNOX'; delete from serviceconfighosts where service_config_id in (select service_config_id from serviceconfig where service_name = 'KNOX'); delete from serviceconfigmapping where service_config_id in (select service_config_id from serviceconfig where service_name = 'KNOX'); delete from serviceconfig where service_name = 'KNOX'; delete from requestresourcefilter where service_name = 'KNOX'; delete from requestoperationlevel where service_name = 'KNOX'; delete from clusterservices where service_name ='KNOX'; delete from clusterconfig where type_name like 'knox%'; delete from clusterconfigmapping where type_name like 'knox%';
.
Please see: https://community.hortonworks.com/content/kbentry/81939/how-to-resolve-ambari-db-inconsistency-error...
Created 03-22-2017 03:39 PM
@Jay SenSharma Thanks for your help..Let me try this one.Moreover i tried the curl calls as well but still i could not delete the services
Created 03-22-2017 03:45 PM
Sure, The Database queries should definitely work well as it leaves no foot print in the database of the service that we wanted to delete and completely cleans all the entries related to that mentioned service from the Database completely. You will need to restart AmbariServer after making the database changes.
Created on 03-22-2017 02:35 PM - edited 08-18-2019 03:46 AM
This are the things i could find in service actions tab
Created 03-22-2017 02:05 PM
Created 03-22-2017 03:01 PM
@saravanan gopalsamy Which version of ambari are you using?
Created 03-22-2017 03:11 PM
@Ayub Khan 2.2.1.0 is amabri version and hdp version is 2.4.3.0-227