[ 
https://issues.apache.org/jira/browse/HBASE-20109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16381440#comment-16381440
 ] 

Andrew Purtell commented on HBASE-20109:
----------------------------------------

bq. Using clustermetrics + option seems a solution?

How so? We have a monitoring client that wants a Java API to call to get the 
location of the current active master. Seems the HBase client API is the right 
place to something like that to go. 

> Add Admin#getMasterLocation API for lightweight discovery of the active 
> master location
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-20109
>                 URL: https://issues.apache.org/jira/browse/HBASE-20109
>             Project: HBase
>          Issue Type: Improvement
>          Components: Client
>    Affects Versions: 1.4.2
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>            Priority: Minor
>             Fix For: 2.0.0, 1.5.0
>
>
> Right now the only public API available to the client to learn the server 
> name of the active master is Admin#getClusterStatus#getMaster, returning 
> ServerName. On a cluster of any size getClusterStatus is expensive, 
> especially if used only to retrieve the active master name. 
> Let's add a simple API 
> {code}
> ServerName Admin#getMasterLocation()
> {code}
> for lightweight discovery of the active master location. This makes sense 
> because, weirdly, Admin already has a method getMasterInfoPort(), returning 
> int. 
> Internally the client has a notion of the active master because there is a 
> connection open to it, or one that can be reopened, or if for some reason 
> it's not easy to make a ServerName for that state, the ServerName can be 
> deserialized out of the znode tracking the active master location.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to