You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Steve Loughran (JIRA)" <ji...@apache.org> on 2011/07/22 17:27:58 UTC

[jira] [Created] (HADOOP-7482) Skip registering Configuration instances that don't load default values

Skip registering Configuration instances that don't load default values
-----------------------------------------------------------------------

                 Key: HADOOP-7482
                 URL: https://issues.apache.org/jira/browse/HADOOP-7482
             Project: Hadoop Common
          Issue Type: Improvement
          Components: conf
    Affects Versions: 0.20.203.0
            Reporter: Steve Loughran
            Priority: Minor


The Configuration constructor registers each instance in a WeakHashMap for reloading if a new default resource is added by way of Configuration.addDefaultResource(). Those configurations that don't declare that they load the defaults (an attribute that is only ever set in the constructor) could skip being registered.

This would deliver minor performance/memory improvements if anyone is creating many instances that don't read in default values. If this is not a common practise, it's not worth adding the fix (which would include making Configuration.loadDefaults final)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira