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

TextInputFormat does not correctly handle all line endings

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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. text-input-format2.patch
          1 kB
          Dennis Kubes
        2. ASF.LICENSE.NOT.GRANTED--text-input-format.patch
          1 kB
          Dennis Kubes

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment