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

Reuse of Writable objects is improperly handled by MRUnit

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: contrib/mrunit
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      As written, MRUnit's MockOutputCollector simply stores references to the objects passed in to its collect() method. Thus if the same Text (or other Writable) object is reused as an output containiner multiple times with different values, these separate values will not all be collected. MockOutputCollector needs to properly use io.serializations to deep copy the objects sent in.

        Activity

        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #25 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Mapreduce-trunk/25/)

        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #25 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Mapreduce-trunk/25/ )
        Hide
        Johan Oskarsson added a comment -

        I've just committed this. Thanks Aaron!

        Show
        Johan Oskarsson added a comment - I've just committed this. Thanks Aaron!
        Hide
        Aaron Kimball added a comment -

        The contrib failures are in streaming, not MRUnit.

        Show
        Aaron Kimball added a comment - The contrib failures are in streaming, not MRUnit.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12412118/MAPREDUCE-680.patch
        against trunk revision 792613.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 5 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        -1 contrib tests. The patch failed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/369/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/369/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/369/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/369/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12412118/MAPREDUCE-680.patch against trunk revision 792613. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 5 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. -1 contrib tests. The patch failed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/369/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/369/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/369/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/369/console This message is automatically generated.
        Hide
        Aaron Kimball added a comment -

        Cycling patch status to get Hudson to enqueue this (seems to have been missed?)

        Show
        Aaron Kimball added a comment - Cycling patch status to get Hudson to enqueue this (seems to have been missed?)
        Hide
        Tom White added a comment -

        +1

        Show
        Tom White added a comment - +1
        Hide
        Aaron Kimball added a comment -

        Attaching a patch which modifies MockOutputCollector to instantiate a SerializationFactory and properly copy the values passed in via the serializations framework. Added a unit test that proves this works.

        Show
        Aaron Kimball added a comment - Attaching a patch which modifies MockOutputCollector to instantiate a SerializationFactory and properly copy the values passed in via the serializations framework. Added a unit test that proves this works.

          People

          • Assignee:
            Aaron Kimball
            Reporter:
            Aaron Kimball
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development