Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-7482

Skip registering Configuration instances that don't load default values

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.20.203.0
    • None
    • conf
    • None

    Description

      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)

      Attachments

        Activity

          People

            Unassigned Unassigned
            stevel@apache.org Steve Loughran
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 0.25h
                0.25h
                Remaining:
                Remaining Estimate - 0.25h
                0.25h
                Logged:
                Time Spent - Not Specified
                Not Specified