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
Highlighted

Hive-clients with Curl command

Explorer

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
Highlighted

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

View solution in original post

4 REPLIES 4
Highlighted

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

Highlighted

Re: Hive-clients with Curl command

Explorer
Highlighted

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

View solution in original post

Re: Hive-clients with Curl command

Explorer

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

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