Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-4782

NLineInputFormat skips first line of last InputSplit

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.22.0, 0.23.0, 1.0.0, 2.0.0-alpha
    • Fix Version/s: 1.1.1, 2.0.3-alpha, 0.23.5
    • Component/s: client
    • Labels:
      None
    • Environment:

      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.

      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

        Mark Fuhs created issue -
        Robert Joseph Evans made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Critical [ 2 ]
        Mark Fuhs made changes -
        Attachment MAPREDUCE-4782.patch [ 12552700 ]
        Robert Joseph Evans made changes -
        Attachment MR-4782.txt [ 12552709 ]
        Robert Joseph Evans made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Affects Version/s 2.0.0-alpha [ 12320354 ]
        Affects Version/s 1.0.0 [ 12318240 ]
        Affects Version/s 0.23.0 [ 12315570 ]
        Target Version/s 0.23.5 [ 12323312 ]
        Matt Foley made changes -
        Target Version/s 0.23.5 [ 12323312 ] 1.1.1, 0.23.5 [ 12321660, 12323312 ]
        Thomas Graves made changes -
        Assignee Mark Fuhs [ mark.fuhs ]
        Robert Joseph Evans made changes -
        Attachment MR-4782-branch-1.txt [ 12552844 ]
        Robert Joseph Evans made changes -
        Priority Critical [ 2 ] Blocker [ 1 ]
        Robert Joseph Evans made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 1.1.1 [ 12321660 ]
        Fix Version/s 1.2.0 [ 12321661 ]
        Fix Version/s 3.0.0 [ 12320355 ]
        Fix Version/s 2.0.3-alpha [ 12323275 ]
        Fix Version/s 0.23.5 [ 12323312 ]
        Resolution Fixed [ 1 ]
        Matt Foley made changes -
        Fix Version/s 1.2.0 [ 12321661 ]
        Matt Foley made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Allen Wittenauer made changes -
        Fix Version/s 3.0.0 [ 12320355 ]
        Allen Wittenauer made changes -
        Affects Version/s trunk [ 12320360 ]

          People

          • Assignee:
            Mark Fuhs
            Reporter:
            Mark Fuhs
          • Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development