Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (1)

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.

1,065 Views
Comments
Super Mentor

Wonderful.

Contributor

Very useful information.

Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎01-24-2017 05:48 PM
Updated by:
 
Contributors
Top Kudoed Authors