You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mrunit.apache.org by Ajay Srivastava <Aj...@guavus.com> on 2012/07/30 15:40:55 UTC

Testing code using mapreduce package

Hi,

I have mapper and reducers written using mapreduce package of hadoop.
It seems that MRunit expects mapper and reducers from mapred package.
How can I make it work for mapreduce package? I used classifier hadoop2
but it is not working.


Regards,
Ajay Srivastava

Re: Testing code using mapreduce package

Posted by Ajay Srivastava <Aj...@guavus.com>.
Thanks.
Changed import org.apache.hadoop.mrunit.*Driver; to import org.apache.hadoop.mrunit.mapreduce.*Driver;
and it worked.


Regards,
Ajay Srivastava



On 30-Jul-2012, at 7:18 PM, Bertrand Dechoux wrote:

Hi,

Verify your imports. There should be 2 'versions' : one for mapred and one for mapreduce : same class names but different packages.

Regards

Bertrand

On Mon, Jul 30, 2012 at 3:40 PM, Ajay Srivastava <Aj...@guavus.com>> wrote:
Hi,

I have mapper and reducers written using mapreduce package of hadoop.
It seems that MRunit expects mapper and reducers from mapred package.
How can I make it work for mapreduce package? I used classifier hadoop2
but it is not working.


Regards,
Ajay Srivastava



--
Bertrand Dechoux


Re: Testing code using mapreduce package

Posted by Bertrand Dechoux <de...@gmail.com>.
Hi,

Verify your imports. There should be 2 'versions' : one for mapred and one
for mapreduce : same class names but different packages.

Regards

Bertrand

On Mon, Jul 30, 2012 at 3:40 PM, Ajay Srivastava <Ajay.Srivastava@guavus.com
> wrote:

> Hi,
>
> I have mapper and reducers written using mapreduce package of hadoop.
> It seems that MRunit expects mapper and reducers from mapred package.
> How can I make it work for mapreduce package? I used classifier hadoop2
> but it is not working.
>
>
> Regards,
> Ajay Srivastava
>



-- 
Bertrand Dechoux