Yes you can do this.
It is complaining because you are not declaring the output types in
the method signature, but you will not use them anyway.
So please try
private static class Reducer extends MapReduceBase implements
Reducer<Text, Writable, Text, Text> {
...
The output format will be a TextOutputFormat, but it will not do anything.
Cheers
Tim
On Thu, May 28, 2009 at 9:57 AM, dealmaker <[email protected]> wrote:
>
> Hi,
> I have maps that do most of the work, and they output the data into a
> reducer, so basically key is a constant, and the reducer combines all the
> input from maps into a file and it does "LOAD_DATA" the file into mysql db.
> So, there won't be any output.collect ( ) in reducer function. But when I
> write the class Reducer, the compiler keeps complaining about the missing 2
> types at the end of in "private static class Reducer extends MapReduceBase
> implements Reducer<Text, Writable> " which doesn't have output.collect ( ).
> What should I put in there?
>
> Do I even need Reducer at all? I think that only one reducer saves the file
> will be more efficient, rather than having all the map to save data into
> same file individually. Any better way to do this?
>
> Thanks.
> --
> View this message in context:
> http://www.nabble.com/Can-I-have-Reducer-with-No-Output--tp23756950p23756950.html
> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>
>