> hi, All****>> ** **>> Is there any way to set Reducer to output to multi-places ? For example:> a reducer's result can be output to HDFS and Database concurrently.****>> ** **>> Thanks,****>> Francis.Hu****>

MultipleOutputFormat allows you to write multiple files in one reducer, butcan't write output to HDFS and Database concurrently, but I is a goodexample to show how you can write a customized OutputFormat to achieve this.Please note that for fault tolerance, a reducer may run multiple times,this may generate redundant data, hadoop handles files usingFileOutputCommitter, you need to handle database case by yourself(e.g.insert record only if record doesn't exists).On Mon, Sep 2, 2013 at 5:11 PM, Rahul Bhattacharjee <[EMAIL PROTECTED]> wrote:

发件人: Binglin Chang [mailto:[EMAIL PROTECTED]] 发送时间: Monday, September 02, 2013 17:37收件人: [EMAIL PROTECTED]主题: Re: Is there any way to set Reducer to output to multi-places?

MultipleOutputFormat allows you to write multiple files in one reducer, but can't write output to HDFS and Database concurrently, but I is a good example to show how you can write a customized OutputFormat to achieve this.

Please note that for fault tolerance, a reducer may run multiple times, this may generate redundant data, hadoop handles files using FileOutputCommitter, you need to handle database case by yourself(e.g. insert record only if record doesn't exists).