[
https://issues.apache.org/jira/browse/HBASE-5149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13186353#comment-13186353
]
Mikael Sitruk commented on HBASE-5149:
--------------------------------------
HbaseAdmin.getServerConfig(ServerName) is also fine from my point of view.
As far as I understand the concern Todd concern perhaps the problem is that the
HRegionServer should have a method for local config, and HRegionInterface have
the method for the remote call.
* HRegionInterface is the interface used by client to interact with the server
side, it is logic that method are remote call
* HRegionServer is the implementation used by server side, so it is expected to
work locally.
So perhaps all the point should be to refactor HRegionServer.getConnection()
--> HRegionServer.getLocalConnection(), and to add on HRegionInterface the
getConnection() throws IOException
but this are my two cents.
> 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