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

TextInputFormat does not correctly handle all line endings

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.5.0, 0.6.0
    • 0.6.0
    • None
    • None
    • All environments

    Description

      The current TextInputFormat readLine method calls break on either a single '\r' or '\n' character. This causes windows formatted text files '\r' '\n' to leave a trailing '\n' character and the next time the readLine method is called on the same input stream it returns a blank string. The patch attached corrects this issue by looking for either single or double character line endings and positions the input stream to the next line. It correctly handles windows, mac, and unix line endings.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--text-input-format.patch
          1 kB
          Dennis Kubes
        2. text-input-format2.patch
          1 kB
          Dennis Kubes

        Activity

          People

            Unassigned Unassigned
            musepwizard Dennis Kubes
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: