Andrew Purtell created HBASE-20109:
--------------------------------------

             Summary: Add Admin#getMasterAddress 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
            Reporter: Andrew Purtell
            Assignee: Andrew Purtell
             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#getMasterAddress()
{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