You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by Bhavesh Shah <bh...@gmail.com> on 2011/12/27 10:59:21 UTC

Writing output in multiple files in Hadoop

Hello all,
I want to write the files according to months using map-reduce in
hadoop. If data is from January month then the data should be wriiten
in jan-file and likewise for each month there should be seperate file.

How Can I create such file in hadoop mapredude. I am trying for
recursive map-reduce but not getting how to implement it?

Pls suggest me some solution.

Thanks.


-- 
Regards,
Bhavesh Shah

Re: Writing output in multiple files in Hadoop

Posted by Harsh J <ha...@cloudera.com>.
Use the class 'MultipleOutputs':
hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/mapred/lib/MultipleOutputs.html

On Tue, Dec 27, 2011 at 3:29 PM, Bhavesh Shah <bh...@gmail.com> wrote:
> Hello all,
> I want to write the files according to months using map-reduce in
> hadoop. If data is from January month then the data should be wriiten
> in jan-file and likewise for each month there should be seperate file.
>
> How Can I create such file in hadoop mapredude. I am trying for
> recursive map-reduce but not getting how to implement it?
>
> Pls suggest me some solution.
>
> Thanks.
>
>
> --
> Regards,
> Bhavesh Shah



-- 
Harsh J