Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
MapReduce >> mail # user >> How to unit test mappers reading data from DistributedCache?


+
Barak Yaish 2013-01-17, 20:07
Copy link to this message
-
Re: How to unit test mappers reading data from DistributedCache?
Hi,

Not sure how to do it using MRUnit, but should be possible to do this using
a mocking framework like Mockito or EasyMock. In a mapper (or reducer),
you'd use the Context classes to get the DistributedCache files. By mocking
these to return what you want, you could potentially run a true unit test.

Thanks
Hemanth
On Fri, Jan 18, 2013 at 1:37 AM, Barak Yaish <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I've found MRUnit a very easy to unit test jobs, is it possible as well to
> test mappers reading data from DisributedCache? If yes, can you share an
> example how the test' setup() should look like?
>
> Thanks.
>