Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hive : Not able to delete mysqlserver from amari

Solved Go to solution

Hive : Not able to delete mysqlserver from amari

New Contributor

73396-mysqlserver.jpg

Hi,

I moved "mysqlserver" to node2 from node1 in hive using ambari. In between mysqlserver install got failed.

Mysqlserver moved to node2 but existing node1 mysqlserver has not been deleted. I tried to delete using ambari. But delete option is disable. Please check the attached screenshot.

Looking for your reply.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Hive : Not able to delete mysqlserver from amari

New Contributor

We can check any client/service for the node using the below url.

 http://ambari_host:8080/api/v1/clusters/PANDA/hosts/host_name/host_components

The below commands will be used for deleting client/service.

Here PANDA is cluster name. ambari_host is ambari_server_host. host_name is fqdn of host name.

export AMBARI_USER=rambabu 
export AMBARI_PASSWD=password 

curl -u $AMBARI_USER:$AMBARI_PASSWD -H 'X-Requested-By: ambari' -X GET "http://ambari_host:8080/api/v1/clusters/PANDA/hosts/host_name/host_components/MYSQL_SERVER" 

curl -u $AMBARI_USER:$AMBARI_PASSWD -H 'X-Requested-By: ambari' -X DELETE "http://ambari_host:8080/api/v1/clusters/PANDA/hosts/host_name/host_components/MYSQL_SERVER"
8 REPLIES 8

Re: Hive : Not able to delete mysqlserver from amari

New Contributor

Hi, your MySQL Service is part of your Hive Service. You can't only delete the MySQL Service.

Re: Hive : Not able to delete mysqlserver from amari

New Contributor

We can delete kevin han. If you want you can check my solution. It worked for me.

Re: Hive : Not able to delete mysqlserver from amari

Expert Contributor

As mentioned before, make sure your Hive Service is connected to the new location of MySQL. Removing MySQL without will result in losing all you metadata.

You can use Ambari REST API to remove services manually:

curl -u admin:admin -H "X-Requested-By: ambari"-X DELETE http://AMBARI_SERVER_HOST:8080/api/v1/clusters/c1/services/SERVICENAME

https://cwiki.apache.org/confluence/display/AMBARI/Using+APIs+to+delete+a+service+or+all+host+compon...

Highlighted

Re: Hive : Not able to delete mysqlserver from amari

New Contributor

Thanks Umair Khan. I got the solution.

Re: Hive : Not able to delete mysqlserver from amari

New Contributor

We can check any client/service for the node using the below url.

 http://ambari_host:8080/api/v1/clusters/PANDA/hosts/host_name/host_components

The below commands will be used for deleting client/service.

Here PANDA is cluster name. ambari_host is ambari_server_host. host_name is fqdn of host name.

export AMBARI_USER=rambabu 
export AMBARI_PASSWD=password 

curl -u $AMBARI_USER:$AMBARI_PASSWD -H 'X-Requested-By: ambari' -X GET "http://ambari_host:8080/api/v1/clusters/PANDA/hosts/host_name/host_components/MYSQL_SERVER" 

curl -u $AMBARI_USER:$AMBARI_PASSWD -H 'X-Requested-By: ambari' -X DELETE "http://ambari_host:8080/api/v1/clusters/PANDA/hosts/host_name/host_components/MYSQL_SERVER"

Re: Hive : Not able to delete mysqlserver from amari

New Contributor

Good to know. Thanks for sharing! I will give a try.

Re: Hive : Not able to delete mysqlserver from amari

Mentor

Not sure that solutio will work :-)

Re: Hive : Not able to delete mysqlserver from amari

New Contributor

I tried and verified in my 10 node cluster. It worked perfectly.