Today I found out that the ASF retired mrunit (see https://blogs.apache.org/foundation/entry/the_apache_news_round_up85 and https://issues.apache.org/jira/browse/HADOOP-3733 and the homepage itself). Other than "inactivity" there was no reason given, so I guess there has to be an alternative?
What's supposed to be used instead of mrunit to unit test mapreduce jobs in the future?
What statements do MRUnit describe? It allows you to trace and debug code using the JUnit test case as a driver. It allows you to trace and debug code using the JU nit test case as a driver .
MRUnit is a JUnit-based Java library that allows us to unit test Hadoop MapReduce programs. This makes it easy to develop as well as to maintain Hadoop MapReduce code bases. MRUnit supports testing Mappers and Reducers separately as well as testing MapReduce computations as a whole.
I believe the reason for this retirement is the realization that Mockito already can handle what you need to unit test your mapper/reducers. All you need is to mock your Context, Counter and HBase KeyValue and you can then pass in a row (in the form of the Result object) to a mapper and check if the key/value emitted is correct.
FYI - I actually got my MR unit tests working perfectly using this approach without any assistance from MRUnit and PowerMock.
Not exactly a successor, but I tried and tested a work-around with a bit of research. It is actually based on the Minicluster module of hadoop.
To find out how to use it, details can be found in this link here. And a github demo project exists here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With