Hadoop Common
  1. Hadoop Common
  2. HADOOP-2174

distcp throws a NullPointerException in the close() method of mapper class due to the Reporter becoming invalid

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.15.0
    • Fix Version/s: 0.15.1
    • Component/s: util
    • Labels:
      None

      Description

      distcp occasionally throws a NullPointerException in the close() method of the mapper class, when the copy of the Reporter handle becomes invalid:

      java.lang.NullPointerException
      at org.apache.hadoop.util.CopyFiles$FSCopyFilesMapper.updateStatus(CopyFiles.java:242)
      at org.apache.hadoop.util.CopyFiles$FSCopyFilesMapper.close(CopyFiles.java:402)
      at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:53)
      at org.apache.hadoop.mapred.MapTask.run(MapTask.java:192)
      at org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:1760)

      This can easily be fixed by checking whether the Reporter is null before updating the status. Also, the status could be updated once the invocation of copy(srcstat, dstpath, out, reporter); returns on line 373 of CopyFiles.java. Marking this as critical for a 0.15.1 release as Chris requested.

      1. 2174-1.patch
        2 kB
        Chris Douglas

        Activity

        Nigel Daley made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Arun C Murthy made changes -
        Resolution Fixed [ 1 ]
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Arun C Murthy made changes -
        Assignee Chris Douglas [ chris.douglas ]
        Chris Douglas made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Chris Douglas made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Chris Douglas made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Chris Douglas made changes -
        Attachment 2174.patch [ 12369203 ]
        Chris Douglas made changes -
        Attachment 2174-1.patch [ 12369205 ]
        Chris Douglas made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Chris Douglas made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Chris Douglas made changes -
        Field Original Value New Value
        Attachment 2174.patch [ 12369203 ]
        Riccardo Boscolo created issue -

          People

          • Assignee:
            Chris Douglas
            Reporter:
            Riccardo Boscolo
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development