CHAPTER 8

image

Testing Hadoop Programs

This chapter explores how Hadoop programs can be unit tested in your local Integrated Development Environment (IDE). Although unit-testing of Hadoop programs has come a long way since the early days of Hadoop, it continues to be challenging because Hadoop components such as Mappers and Reducers run in a distributed environment.

We discuss the MapReduce unit-testing API called MRUnit, which enables us to unit test Mapper and Reducer classes independently. After discussing the limitations of MRUnit, we explore the LocalJobRunner class that handles these limitations. The chapter closes by looking at exploring

Get Pro Apache Hadoop, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.