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

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

@Mikhael

When regionserver checks in, its passed some config to use such as 
hbase.rootdir.  Regards cluster properties, one idea thats been kicked around 
is putting config up in zk.   Yes, we should mod the getConfiguration client 
code to say its local config. (and add a call to HBaseAdmin for asking a server 
its config -- w/ doc to say its doing an RPC to ameliorate Todds concern.  On 
the other hand, in hadoops in excess of 1.0.0, there is a configuration servlet 
that will serve up a server's configuration that we can reveal at no cost in 
hbase).
                
> 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