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

Unclear precedence of config files and property definitions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • conf
    • None
    • Hadoop 0.1.1, Nutch 0.8-dev

    Description

      The order in which configuration resources are read is not sufficiently documented, and also there are no mechanisms preventing harmful re-definition of certain properties, if they are put in wrong config files.

      From reading the code in Hadoop Configuration.java, JobConf.java and Nutch NutchConfiguration.java I think this is what's happening.

      There are two groups of resources: default resources, loaded first, and final resources, loaded at the end. All properties (re)-defined in files loaded later will override any previous definitions:

      • default resources: loaded in the order as they are added. The following files are added here, in order:

      1. hadoop-default.xml (Configuration)
      2. nutch-default.xml (NutchConfiguration)
      3. mapred-default.xml (JobConf)
      4. job_xx_xxx.xml (JobConf, in JobConf(File config))

      • final resource: which always come after default resources, i.e. if any value is defined here it will always override those set in default resources (NOTE: including per job settings!!!). The following files are added here, in reversed order:

      2. hadoop-site.xml (Configuration)
      1. nutch-site.xml (NutchConfiguration)

      (i.e. hadoop-site.xml will take precedence over anything else defined in any other config file).

      I would appreciate checking that this is indeed the case, and suggestions how to ensure that you cannot so easily shoot yourself in the foot if you define wrong properties in hadoop-site or nutch-site ...

      Attachments

        Activity

          People

            cutting Doug Cutting
            ab Andrzej Bialecki
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: