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.

Ambari API call to retrieve hostname of active HBase master?

Solved Go to solution

Ambari API call to retrieve hostname of active HBase master?

Explorer

Using Ambari apis, is there a way to get the host name of the Active HBase Master?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Ambari API call to retrieve hostname of active HBase master?

@Romil Choksi You can use additional queries in the GET HostComponents API

e.g

<AMBARI_HOST>/api/v1/clusters/cl1/host_components?HostRoles/component_name=HBASE_MASTER&metrics/hbase/master/IsActiveMaster=true	

Hope this helps!

View solution in original post

3 REPLIES 3
Highlighted

Re: Ambari API call to retrieve hostname of active HBase master?

@Romil Choksi You can use additional queries in the GET HostComponents API

e.g

<AMBARI_HOST>/api/v1/clusters/cl1/host_components?HostRoles/component_name=HBASE_MASTER&metrics/hbase/master/IsActiveMaster=true	

Hope this helps!

View solution in original post

Highlighted

Re: Ambari API call to retrieve hostname of active HBase master?

Explorer

@kramakrishnan thanks. This helps.

Highlighted

Re: Ambari API call to retrieve hostname of active HBase master?

@Romil Choksi

You can prepare similar queries by identifying the fields defined using query parameter ?fields=* with most of the ambari APIs

e.g  <AMBARI_HOST>/api/v1/clusters/cl1/host_components?fields=*
Don't have an account?
Coming from Hortonworks? Activate your account here