hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Kozlov <ale...@cloudera.com>
Subject Re: tab-delimited output
Date Wed, 12 May 2010 21:50:20 GMT
Hi Alan,

Is the problem that you want your 'value' vals to be tab separated?   This
is entirely under control of your reducer.

Alex K

On Wed, May 12, 2010 at 2:07 PM, Alan Miller <somebody@squareplanet.de>wrote:

> Hi all,
>
> How can I write tab-delimited output files from my reducer?
>
> My reducer gets Text/Text key/vals like:
>
> hostX_2010-05-01 varA=valA1,varB=valB1,varC=valC1
> hostX_2010-05-01 varA=valA2,varB=valB2,varC=valC2
> hostX_2010-05-01 varA=valA3,varB=valB3,varC=valC3
> ...
> hostY_2010-05-01 varA=valA1,varB=valB1,varC=valC1
> hostY_2010-05-01 varA=valA2,varB=valB2,varC=valC2
> hostY_2010-05-01 varA=valA3,varB=valB3,varC=valC3
> ...
>
> After my reducer calcs the daily averages of varA,B,C
> I  want to write a tab-delimited file with lines like:
>
> hostX    varA-Avg    varB-Avg    varC-Avg    ....
> hostY    varA-Avg    varB-Avg    varC-Avg    ....
>
>
> Thanks,
> Alan
>

Mime
View raw message