Created 07-07-2019 03:49 PM
hi all
by the following API we can delete the thrift server component on master01 and master03 nodes
# curl -iv -u admin:admin -H "X-Requested-By: ambari" -X DELETE http://$AMBARI_SERVER:8080/api/v1/clusters/hdp/hosts/master01/host_components/SPARK2_THRIFTSERVER
# curl -iv -u admin:admin -H "X-Requested-By: ambari" -X DELETE http://$AMBARI_SERVER:8080/api/v1/clusters/hdp/hosts/master03/host_components/SPARK2_THRIFTSERVER
but how to know by REST API that thrift server component , not defined on specific node ( after deletion )
Created 07-07-2019 10:27 PM
You can make the following API call to find out on how many nodes the "SPARK2_THRIFTSERVER" is installed. Please check the property "installed_count" in the response.
# curl -iv -u admin:admin -H "X-Requested-By: ambari" -X GET "http://$AMBARI_SERVER:8080/api/v1/clusters/hdp/services/SPARK2/components/SPARK2_THRIFTSERVER"
If you want to know the list of hosts where the "SPARK2_THRIFTSERVER" might be installed in your cluster and to know their current state you can make the following API call.
# curl -iv -u admin:admin -H "X-Requested-By: ambari" -X GET "http://$AMBARI_SERVER:8080/api/v1/clusters/hdp/services/SPARK2/components/SPARK2_THRIFTSERVER?fields=host_components/HostRoles/host_name,host_components/HostRoles/state"
.
Created 07-07-2019 10:27 PM
You can make the following API call to find out on how many nodes the "SPARK2_THRIFTSERVER" is installed. Please check the property "installed_count" in the response.
# curl -iv -u admin:admin -H "X-Requested-By: ambari" -X GET "http://$AMBARI_SERVER:8080/api/v1/clusters/hdp/services/SPARK2/components/SPARK2_THRIFTSERVER"
If you want to know the list of hosts where the "SPARK2_THRIFTSERVER" might be installed in your cluster and to know their current state you can make the following API call.
# curl -iv -u admin:admin -H "X-Requested-By: ambari" -X GET "http://$AMBARI_SERVER:8080/api/v1/clusters/hdp/services/SPARK2/components/SPARK2_THRIFTSERVER?fields=host_components/HostRoles/host_name,host_components/HostRoles/state"
.