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

Validate xml configuration files with XML Schema

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      I spent an embarrassingly long time today trying to figure out why the following wouldn't work.

      <property>
        <key>fs.defaultFS</key>
        <value>hdfs://localhost:9000</value>
      </property>
      

      I just kept getting an error about no authority for fs.defaultFS, with a value of file:///, which made no sense... because I knew it was there.

      The problem was that the core-site.xml was parsed entirely without any validation. This seems incorrect. The very least that could be done is a simple XML Schema validation against an XSD, before parsing. That way, users will get immediate failures on common typos and other problems in the xml configuration files.

      Attachments

        1. HADOOP-7947.branch-2.1.patch
          22 kB
          Gabor Liptak
        2. hadoop-configuration.xsd
          0.8 kB
          Gabor Liptak

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ctubbsii Christopher Tubbs
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: