Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Ambari API call to retrieve hostname of active HBase master?

avatar
Contributor

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

1 ACCEPTED SOLUTION

avatar
New Member

@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

avatar
New Member

@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!

avatar
Contributor

@kramakrishnan thanks. This helps.

avatar
New Member
@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=*