mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Hall <d...@cs.stanford.edu>
Subject Re: Hadoop 0.20 and DummyOutputCollector
Date Wed, 22 Jul 2009 21:20:51 GMT
It's a non-static inner class, you can't construct those outside of
the enclosing class can you? Or is my java that rusty?

-- David

On Wed, Jul 22, 2009 at 2:14 PM, Ted Dunning<ted.dunning@gmail.com> wrote:
> I don't quite understand how this complicates testing but leaves this code
> running.
>
> Why can these classes not construct a mock Context?
>
> On Wed, Jul 22, 2009 at 1:26 PM, David Hall <dlwh@cs.stanford.edu> wrote:
>
>> These won't work in the new api. As far as I can tell, the only ways
>> to fix this are to either:
>> 1) factor out a method that is testable, but this makes the code less
>> idiomatic
>> 2) abuse reflection to create a Mapper.Context (not sure about this,
>> but I imagine it's doable), and supply a utility method for this
>> 3) individually override each Mapper class in each test and include
>> similar logic to get it done.
>>
>
>
>
> --
> Ted Dunning, CTO
> DeepDyve
>

Mime
View raw message