Issue Details (XML | Word | Printable)

Key: HADOOP-5518
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Aaron Kimball
Reporter: Aaron Kimball
Votes: 0
Watchers: 10
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

MRUnit unit test library

Created: 17/Mar/09 08:37 PM   Updated: 29/Sep/09 07:33 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 0.21.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works HADOOP-5518-2.patch 2009-03-30 10:25 PM Aaron Kimball 101 kB
Text File Licensed for inclusion in ASF works HADOOP-5518-3.patch 2009-03-31 02:26 AM Aaron Kimball 103 kB
Text File Licensed for inclusion in ASF works HADOOP-5518-branch18.patch 2009-05-11 10:36 PM Aaron Kimball 99 kB
Text File Licensed for inclusion in ASF works mrunit.patch 2009-03-17 08:38 PM Aaron Kimball 101 kB
HTML File Licensed for inclusion in ASF works overview.html 2009-03-17 08:38 PM Aaron Kimball 4 kB
Issue Links:
Dependants
 

Hadoop Flags: Reviewed
Release Note: New contribution MRUnit helps authors of map-reduce programs write unit tests with JUnit.
Resolution Date: 06/Apr/09 09:24 PM


 Description  « Hide
MRUnit is a tool to help authors of MapReduce programs write unit tests.

Testing map() and reduce() methods requires some repeated work to mock the inputs and outputs of a Mapper or Reducer class, and ensure that the correct values are emitted to the OutputCollector based on inputs. Also, testing a mapper and reducer together requires running them with the sorted ordering guarantees made by the shuffle process.

This library provides the above functionality to authors of maps and reduces; it allows you to test maps, reduces, and map-reduce pairs without needing to perform all the setup and teardown work associated with running a job.

I believe this tool may be useful to the broader Hadoop community, so I have cleaned it up and would like to see it become a "contrib" module. My current environment is based on Hadoop 0.18, so this is the format it expects to use. It does not have support for the new Context-based interfaces for mappers/reducers.

I have attached the overview.html file for its javadoc, which provides more synopsis and an example of usage; I am also providing the current source code so that you can evaluate its structure.

Ideally with some feedback from the community this will move toward supporting the current trunk interface soon.

This currently works with JUnit 4; the supplied patch changes Ivy's libraries.properties file to use JUnit 4.5. I'm marking HADOOP-4901 as a dependency for this reason.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Aaron Kimball made changes - 17/Mar/09 08:38 PM
Field Original Value New Value
Attachment mrunit.patch [ 12402415 ]
Attachment overview.html [ 12402414 ]
Aaron Kimball made changes - 17/Mar/09 08:38 PM
Link This issue depends on HADOOP-4901 [ HADOOP-4901 ]
Aaron Kimball made changes - 26/Mar/09 03:15 PM
Assignee Aaron Kimball [ kimballa ]
Status Open [ 1 ] Patch Available [ 10002 ]
Aaron Kimball made changes - 30/Mar/09 10:25 PM
Attachment HADOOP-5518-2.patch [ 12404186 ]
Aaron Kimball made changes - 30/Mar/09 10:26 PM
Status Patch Available [ 10002 ] Open [ 1 ]
Aaron Kimball made changes - 30/Mar/09 10:26 PM
Status Open [ 1 ] Patch Available [ 10002 ]
Aaron Kimball made changes - 31/Mar/09 02:26 AM
Attachment HADOOP-5518-3.patch [ 12404202 ]
Aaron Kimball made changes - 31/Mar/09 02:26 AM
Status Patch Available [ 10002 ] Open [ 1 ]
Aaron Kimball made changes - 31/Mar/09 02:26 AM
Status Open [ 1 ] Patch Available [ 10002 ]
Doug Cutting made changes - 06/Apr/09 09:24 PM
Resolution Fixed [ 1 ]
Fix Version/s 0.21.0 [ 12313563 ]
Hadoop Flags [Reviewed]
Status Patch Available [ 10002 ] Resolved [ 5 ]
Aaron Kimball made changes - 11/May/09 10:28 PM
Attachment HADOOP-5518-branch18.patch [ 12407825 ]
Aaron Kimball made changes - 11/May/09 10:35 PM
Attachment HADOOP-5518-branch18.patch [ 12407825 ]
Aaron Kimball made changes - 11/May/09 10:36 PM
Attachment HADOOP-5518-branch18.patch [ 12407826 ]
Robert Chansler made changes - 29/Sep/09 07:33 PM
Release Note MRUnit is a tool to help authors of MapReduce programs write unit tests. It allows easy testing of Mapper and Reducer implementations using JUnit. New contribution MRUnit helps authors of map-reduce programs write unit tests with JUnit.