hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Latham (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-2036) Use Configuration instead of HBaseConfiguration
Date Mon, 14 Dec 2009 23:07:18 GMT

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

Dave Latham commented on HBASE-2036:

Yes, we can make a new Configuration instance just as we currently do, but if that Configuration
has the same properties as an existing one, then we should reuse the cached connections &
data instead of building up a new set.  To do that, we need to match against an existing key,
which means a new hash.  So long as we cache the hash, then it only needs to be done once
per instantiation.

On the other hand, if someone is using the HTable() constructor and passing in the same Configuration
each time, then it would be nice to avoid the hash step.  We could bring back the old WeakHashMap
but this time map from Configuration to ConfigurationKey so that we can reuse the ConfigurationKey
if it's the same instance of Configuration.  Is it worth that added complexity to avoid recomputing
the hash code each time we instantiate an HTable?  I think I would lean toward no.

> Use Configuration instead of HBaseConfiguration 
> ------------------------------------------------
>                 Key: HBASE-2036
>                 URL: https://issues.apache.org/jira/browse/HBASE-2036
>             Project: Hadoop HBase
>          Issue Type: Improvement
>            Reporter: Enis Soztutar
>         Attachments: hconf.patch
> HBaseConfiguration extends Configuration but does not add any functionality to it. The
only function is hashCode() which really should be refactored into Hadoop Configuration. 
> I think in all the places(especially in the client side)  HBase methods and classes should
accept Configuration rather than HBaseConfiguration. The creation of the configuration with
the right files (hbase-site and hbase-default) should not be encapsulated in a private method,
but in a public static one. 
> The issues has arisen in our nutch+hbase patch for which we include both nutch configuration
and hbase configurations. Moreover people may want to include separate project-specific configuration
files to their configurations without the need to be dependent on the HBaseConfiguration.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message