Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-5121

Problem with field separator in FieldSelectionHelper

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 2.6.0
    • None
    • None
    • None

    Description

      I found that org.apache.hadoop.mapreduce.lib.fieldsel.FieldSelectionHelper and the corresponding old api org.apache.hadoop.mapred.lib.FieldSelectionMapReduce take user specified separator string as a regular expression in String.split(), but also use it as a normal string in StringBuffer.append(). It will be a problem if the separator string contains meta character. I suggest take separator literally by calling Pattern.quote(separator). Or just use another property to specify the separator which should be added in the output.

      Attachments

        1. MAPREDUCE-5121.patch
          1 kB
          Kai Wei

        Activity

          People

            Unassigned Unassigned
            kaiwei Kai Wei
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: