Support Questions

Find answers, ask questions, and share your expertise

Hive-clients with Curl command

avatar
Contributor

Hello HCC,

We have a production cluster with 800+ data nodes and hive-clients installed one more than 200+ nodes, i can see that from Ambari

is there a simple way or CURL command to find all hive-clients installed in the cluster which i can see on Cli/Linux box.

HDP:2.6.1

Ambari 2.5.2.0

Thanks,Jalender.

1 ACCEPTED SOLUTION

avatar
Super Guru

@Jalender,

You can use this command to print all the hosts on which HIVE_CLIENT is installed

curl -k -u {ambari-username}:{ambari-password} -H "X-Requested-By:ambari" http://{ambari-host}:{ambari-port}/api/v1/clusters/{cluster-name}/services/HIVE/components/HIVE_CLIE... | grep host_name | awk '{ print $3 }'

Replace all the placeholders before running.

If this worked for you, please click on the Accept button to accept the answer. This will be really helpful for other community users

Thanks,

Aditya

View solution in original post

4 REPLIES 4

avatar
Master Mentor

@Jalender


Here is an example for YARN_CLIENT

// Getting the state of the component

curl -k -u admin:admin -H "X-Requested-By:ambari" -i -X GET
http://<HOST>:8080/api/v1/clusters/<CLUSTER_NAME>/hosts/<HOST_FQDN>/host_components/YARN_CLIENT 

Hope that helps

avatar
Contributor

avatar
Super Guru

@Jalender,

You can use this command to print all the hosts on which HIVE_CLIENT is installed

curl -k -u {ambari-username}:{ambari-password} -H "X-Requested-By:ambari" http://{ambari-host}:{ambari-port}/api/v1/clusters/{cluster-name}/services/HIVE/components/HIVE_CLIE... | grep host_name | awk '{ print $3 }'

Replace all the placeholders before running.

If this worked for you, please click on the Accept button to accept the answer. This will be really helpful for other community users

Thanks,

Aditya

avatar
Contributor

@Aditya Sirna it works like a charm, thank you so much 🙂