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

Configuration should trim whitespace around a lot of value types

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.22.0, 0.23.0
    • 0.22.0, 0.23.0
    • conf
    • None
    • Reviewed

    Description

      I've seen multiple users make an error where they've listed some whitespace around a class name (eg for configuring a scheduler). This results in a ClassNotFoundException which is very hard to debug, as you don't notice the whitespace in the exception! We should simply trim the whitespace in Configuration.getClass and Configuration.getClasses to avoid this class of user error.

      Similarly, we should trim in getInt, getLong, etc - anywhere that whitespace doesn't have semantic meaning we should be a little less strict on input.

      Attachments

        1. HADOOP-6578.patch
          8 kB
          Michele Catasta

        Issue Links

          Activity

            People

              pirroh Michele Catasta
              tlipcon Todd Lipcon
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: