hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikael Sitruk (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-5149) getConfiguration() implementation is misleading
Date Sat, 14 Jan 2012 00:10:42 GMT

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

Mikael Sitruk commented on HBASE-5149:
--------------------------------------

+1 for making the method public.
regarding the need for cluster conf, i also understand your point nevertheless having out
of sync config may cause problem and more are the servers more time it will take to find a
problem. 
Aren't some property be the same for all configurations? like hbase.root.dir? or hbase.zookeeper.quorum?


I suggest anyway to add a comment in javadoc to clarify what you get when you call getConfiguration()
from an "object, something like "getConfiguration()" will return the local configuration object
not a 'cluster' wise configuration.

                
> 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

        

Mime
View raw message