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

stack commented on HBASE-5149:
------------------------------

Seems fine to me... could just make the Server/HRI getConfiguration public.  
There is no 'cluster' configuration; each server has its own local version of 
Configuration (downside is that they could be out of sync.  upside is that they 
can be out of sync so can try different config on one regionserver independent 
of the others on cluster)
                
> getConfiguration() implementation is misleading
> -----------------------------------------------
>
>                 Key: HBASE-5149
>                 URL: https://issues.apache.org/jira/browse/HBASE-5149
>             Project: HBase
>          Issue Type: Improvement
>          Components: master, regionserver
>    Affects Versions: 0.90.1, 0.90.2, 0.90.4
>            Reporter: Mikael Sitruk
>
> The following code will not return the cluster configuration but the local 
> one which is somewhat misleading.
> {code}
> conn = (HConnection) HConnectionManager.getConnection(m_hbConfig); //here the 
> configuration is local
> Configuration conf = conn.getConfiguration()
> conf.getString("hbase.hregion.majorcompaction"); // will return the parameter 
> from the local config instead of the cluster the connection is connected to.
> {code}
> It is suggested that once a connection has been acquired the configuration 
> object should be the one of the cluster.
> As a general observation it is not possible to retrieve the used 
> configuration on the cluster
> It is suggested to add API at {{HRegionServerInterface}}, 
> {{HMasterInterface}} to get the configuration used by the component 
> appropriately (note in 0.90.4 the getConfiguration exist on the Server 
> interface implemented by HRegionServer and HMaster classes) but this 
> interface is not visible/extended by HRegionServerInterface/HMasterInterface, 
> therefore not accessible from client code.
> Also an API like {{HashMap<HserverInfo,Configuration> 
> getClusterConfigurations()}} can be added on the HConnection object.
> Additional notes:
> Since servers can have different properties values (like disk, tmp dir,...) 
> it can be acceptable that the configuration object returned by the connection 
> returns special value to indicate - conflict between value or that multiple 
> values exist.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to