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

Variables in configuration properties are substituted in wrong order of precedence

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.2.0
    • None
    • conf
    • None

    Description

      API doc of Configuration states:

      Value strings are first processed for variable expansion. The available properties are:
      1. Other properties defined in this Configuration; and, if a name is undefined here,
      2. Properties in System.getProperties().

      The current implementation of variable expansion, however, gives precedence to system properties. If a system property is defined it's value is used no matter whether a configuration property of same name exists.
      This may cause inconsistent behaviour, e.g., if in the API doc example "basedir" is set as system property (-Dbasedir=/mnt/tmp) the results of two intuitively equivalent calls differ:

       new Path(conf.get("tempdir"))        // = /mnt/data/tmp
       new Path(conf.get("basedir"), "tmp") // = /user/wastl/tmp
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            snagel Sebastian Nagel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: