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]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar

Usually service can be removed using API calls, but if the service is inconsistent state then API's does not work.

so only way to delete is by running SQL queries. here is the list of steps to delete KNOX service.

1. delete from serviceconfigmapping where service_config_id in (select service_config_id from serviceconfig where service_name like '%KNOX%')

2. delete from confgroupclusterconfigmapping where config_type like '%knox%'

3. delete from clusterconfig where type_name like '%knox%'

4. delete from clusterconfigmapping where type_name like '%knox%'

5. delete from serviceconfig where service_name = 'KNOX'

6. delete from servicedesiredstate where service_name = 'KNOX'

7. delete from hostcomponentdesiredstate where service_name = 'KNOX'

8. delete from hostcomponentstate where service_name = 'KNOX'

9.delete from servicecomponentdesiredstate where service_name = 'KNOX'

10.delete from clusterservices where service_name = 'KNOX'

11. DELETE from alert_history where alert_definition_id in ( select definition_id from alert_definition where service_name = 'KNOX')

12.DELETE from alert_notice where history_id in ( select alert_id from alert_history where alert_definition_id in ( select definition_id from alert_definition where service_name = 'KNOX'))

13.DELETE from alert_definition where service_name like '%KNOX%'

Note1: I have tried and tested this in Ambari 2.4.x

Note2: Above queries are case sensitive - so use Upper/Lower case for service name.

3,501 Views
Comments
avatar
Master Mentor

Wonderful.

avatar

Very useful information.

Version history
Last update:
‎01-24-2017 05:48 PM
Updated by:
Contributors