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-clients with Curl command

Solved Go to solution

Hive-clients with Curl command

New 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

Accepted Solutions

Re: Hive-clients with Curl command

@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

4 REPLIES 4

Re: Hive-clients with Curl command

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

Re: Hive-clients with Curl command

New Contributor

Re: Hive-clients with Curl command

@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

Re: Hive-clients with Curl command

New Contributor

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

Don't have an account?
Coming from Hortonworks? Activate your account here