The error is highlighting the issue.
You can't output List of Puts like this. Your reducer output is Mutation
and NOT a list of Mutation.
I have handled this scenario by defining my own base abstract class:
*public* *abstract* *class* TableReducerBatchPuts<KEYIN, VALUEIN, KEYOUT>
*extends* Reducer<KEYIN, VALUEIN, KEYOUT, List<Put>> {
...
And then using this to implement by reducer by extending this. You can do
something similar, perhaps?
Regards,
Shahab
On Tue, May 19, 2015 at 9:05 AM, Silvio Di gregorio <
[email protected]> wrote:
> Hi
> I'm trying to emit, on reduce phase, a list of puts
>
> *context.write(null , puts);*
>
> puts is
>
> *List<Put> puts=new ArrayList<Put>();*
>
> and the Reduce signature is:
>
> *public static class Reduce extends TableReducer<IntWritable, Text,
> ImmutableBytesWritable>{*
>
> this is the error
>
> *The method write(ImmutableBytesWritable, Mutation) in the type
> TaskInputOutputContext<IntWritable,Text,ImmutableBytesWritable,Mutation> is
> not applicable for the arguments (null, List<Put>)*
>
> thanks
> silvio
>