Created 06-30-2016 02:21 PM
a host crashed which include journal node,but now ambari can not remove host which include jurnal node, anyone has i
Created 06-30-2016 04:00 PM
@Dim Guy please take a look at documentation here.
The preferred way to remove a host is to move the master services from the host, decommission the slave nodes and then remove the host afterdeleting all the host components. However, there are situations such as the host is lost and cannot be brought back online for graceful removal. Under this circumstances the following API calls can be used to clean up the host.
1. Get a list of host components mapped to the host
curl -u admin:admin -H "X-Requested-By: ambari" -X GET http: //AMBARI_SERVER_HOST:8080/api/v1/clusters/c1/hosts/HOSTNAME
|
See the property, "host_components" for all the host.
Sample:
Output:
...
"host_components" : [
{
"href" : "http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTERNAME/hosts/HOSTNAME/host_components/DATANODE" ,
"HostRoles" : {
"cluster_name" : "CLUSTERNAME" ,
"component_name" : "DATANODE" ,
"host_name" : "HOSTNAME"
}
},
{
"href" : "http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTERNAME/hosts/HOSTNAME/host_components/GANGLIA_MO... ,
"HostRoles" : {
"cluster_name" : "CLUSTERNAME" ,
"component_name" : "GANGLIA_MONITOR" ,
"host_name" : "HOSTNAME"
}
}]
...
|
2. DELETE all host components mapped to this host
E.g. Delete DATANODE
curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE http: //AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTERNAME/hosts/HOSTNAME/host_components/DATANODE
|
3. DELETE the host
curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE http: //AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTERNAME/hosts/HOSTNAME |
Created 06-30-2016 04:00 PM
@Dim Guy please take a look at documentation here.
The preferred way to remove a host is to move the master services from the host, decommission the slave nodes and then remove the host afterdeleting all the host components. However, there are situations such as the host is lost and cannot be brought back online for graceful removal. Under this circumstances the following API calls can be used to clean up the host.
1. Get a list of host components mapped to the host
curl -u admin:admin -H "X-Requested-By: ambari" -X GET http: //AMBARI_SERVER_HOST:8080/api/v1/clusters/c1/hosts/HOSTNAME
|
See the property, "host_components" for all the host.
Sample:
Output:
...
"host_components" : [
{
"href" : "http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTERNAME/hosts/HOSTNAME/host_components/DATANODE" ,
"HostRoles" : {
"cluster_name" : "CLUSTERNAME" ,
"component_name" : "DATANODE" ,
"host_name" : "HOSTNAME"
}
},
{
"href" : "http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTERNAME/hosts/HOSTNAME/host_components/GANGLIA_MO... ,
"HostRoles" : {
"cluster_name" : "CLUSTERNAME" ,
"component_name" : "GANGLIA_MONITOR" ,
"host_name" : "HOSTNAME"
}
}]
...
|
2. DELETE all host components mapped to this host
E.g. Delete DATANODE
curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE http: //AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTERNAME/hosts/HOSTNAME/host_components/DATANODE
|
3. DELETE the host
curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE http: //AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTERNAME/hosts/HOSTNAME |
Created 06-30-2016 07:41 PM
It might be required to stop the component as well before Deleting the host components in the host:
curl -u admin:admin -X PUT -d
'{"RequestInfo":{"context":"Stop Service"},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}'
http:
//AMBARI_SERVER_HOST:8080/api/v1/clusters/c1/services/SERVICE_NAME
Created 07-03-2016 03:01 AM
@vpoornalingam I believe your right. Might actually be safer to stop first.