mrunit-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brock Noland <br...@cloudera.com>
Subject Re: Mapper unit test failing - validation failing
Date Wed, 28 Nov 2012 15:58:29 GMT
What are you using for output Key? Is it a custom writable?

On Tue, Nov 27, 2012 at 11:14 PM, Dipesh Khakhkhar <dipeshsoftware@gmail.com
> wrote:

> I'm using MRUnit to test my M/R classes.
>
> My mapper is simple one
>
> - It takes input file with input like
> 1
> 2
> 3
>
> - Its outputs is
> Key 0,0,0
> Value 1,
>
> key 0,0,1
> Value 2,
>
> Now I am using MRUnit to test my mapper with following input and expected
> output -
>
> Input: "1"
> Expected Output: like this mapDriver.withOutput(key, new Text("1,") ); //
> where my key is 0,0,0
>
> I'm getting following error
>
> java.lang.AssertionError: 2 Error(s): (Missing expected output (0,0,0,,
> 1,) at position 0., Received unexpected output (0,0,0,, 1,) at position 0.)
>
> It seems to me my output is correct (lhs==rhs) - am i missing something
> above? Please correct me if I'm wrong.
>
> Thanks in advance for replying and answering my query.
>
> Thanks.
>
>


-- 
Apache MRUnit - Unit testing MapReduce - http://incubator.apache.org/mrunit/

Mime
View raw message