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

NLineInputFormat skips first line of last InputSplit

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 0.22.0, 0.23.0, 1.0.0, 2.0.0-alpha
    • 1.1.1, 2.0.3-alpha, 0.23.5
    • client
    • None

    Description

      NLineInputFormat creates FileSplits that are then used by LineRecordReader to generate Text values. To deal with an idiosyncrasy of LineRecordReader, the begin and length fields of the FileSplit are constructed differently for the first FileSplit vs. the rest.

      After looping through all lines of a file, the final FileSplit is created, but the creation does not respect the difference of how the first vs. the rest of the FileSplits are created.

      This results in the first line of the final InputSplit being skipped. I've created a patch to NLineInputFormat, and this fixes the problem.

      Attachments

        1. MR-4782-branch-1.txt
          5 kB
          Robert Joseph Evans
        2. MR-4782.txt
          6 kB
          Robert Joseph Evans
        3. MAPREDUCE-4782.patch
          3 kB
          Mark Fuhs

        Activity

          People

            mark.fuhs Mark Fuhs
            mark.fuhs Mark Fuhs
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: