Details

    • Type: New Feature New Feature
    • 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
    • Release Note:
      Support new API in unit tests developed with MRUnit.

      Description

      MRUnit's TestDriver implementations use the old org.apache.hadoop.mapred-based classes. TestDrivers and associated mock object implementations are required for org.apache.hadoop.mapreduce-based code.

      1. MAPREDUCE-800.patch
        99 kB
        Aaron Kimball
      2. MAPREDUCE-800.2.patch
        99 kB
        Aaron Kimball

        Activity

        Hide
        Aaron Kimball added a comment -

        Implementation of MRUnit over new API. New code is in the org.apache.hadoop.mrunit.mapreduce package, which contains many identically-named classes to those in the base org.apache.hadoop.mrunit package, similar to the mapred/mapreduce package style used in Hadoop MapReduce itself.

        This adds mock implementations of Mapper.Context and Reducer.Context which are used as inputs to user-provided Mapper and Reducer classes. This takes advantage of the fact that even though Mapper.Context and Reducer.Context are not static classes, they make use of no state of their outer class Mapper or Reducer objects, merely the shared type signature.

        Show
        Aaron Kimball added a comment - Implementation of MRUnit over new API. New code is in the org.apache.hadoop.mrunit.mapreduce package, which contains many identically-named classes to those in the base org.apache.hadoop.mrunit package, similar to the mapred/mapreduce package style used in Hadoop MapReduce itself. This adds mock implementations of Mapper.Context and Reducer.Context which are used as inputs to user-provided Mapper and Reducer classes. This takes advantage of the fact that even though Mapper.Context and Reducer.Context are not static classes, they make use of no state of their outer class Mapper or Reducer objects, merely the shared type signature.
        Hide
        Hadoop QA added a comment -

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

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

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

        -1 patch. The patch command could not apply the patch.

        Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/433/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/12414379/MAPREDUCE-800.patch against trunk revision 800232. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 14 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/433/console This message is automatically generated.
        Hide
        Aaron Kimball added a comment -

        Attaching new patch resynced with trunk.

        Show
        Aaron Kimball added a comment - Attaching new patch resynced with trunk.
        Hide
        Hadoop QA added a comment -

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

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

        +1 tests included. The patch appears to include 14 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/450/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/450/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/450/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/450/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/12415679/MAPREDUCE-800.2.patch against trunk revision 801517. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 14 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/450/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/450/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/450/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-vesta.apache.org/450/console This message is automatically generated.
        Hide
        Aaron Kimball added a comment -

        failures are in streaming

        Show
        Aaron Kimball added a comment - failures are in streaming
        Hide
        Tom White added a comment -

        +1

        I've just committed this. Thanks Aaron!

        Show
        Tom White added a comment - +1 I've just committed this. Thanks Aaron!

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development