-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Hadoop MapReduce v2 Cookbook - Second Edition: RAW - Second Edition
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. In this recipe, we'll be exploring all three testing scenarios. The source code for the test program used in this recipe is available in the chapter3\test\chapter3\WordCountWithToolsTest.java file in the Git repository.
We use Gradle as the build tool for our sample code base. If you haven't already done so, please install Gradle by following the instructions given in the introduction section of Chapter 1, Getting Started with Hadoop v2.
The following steps show you how to perform unit testing of a Mapper using MRUnit:
In the setUp method of the test class, initialize an MRUnit MapDriver instance with the Mapper class you want to...
Change the font size
Change margin width
Change background colour