hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vikas Srivastava <hadooph...@gmail.com>
Subject Re: need help in Mapreduce(urgent)
Date Mon, 09 Jan 2012 12:26:07 GMT
Hi  Bhavesh Shah  ,

thanks for you reply but the this is ,

my Mapper is sending
*context.write(new Text(catagoryAll), new IntWritable(val));*

and my reducer is like
*context.write(key,new IntWritable(sum));*
*
*
and these provide result like

hive      1
hadoop      2

and wat i want is output like

hive,1
hadoop,2

hope i m able to make u understand

so how can i set this in mapper or reducer.

On Mon, Jan 9, 2012 at 5:44 PM, Bhavesh Shah <bhavesh25shah@gmail.com>wrote:

> Hello,
>
>
>
> *1:- How to format output from reduce( like default is tab separator can
> we make it "," separator)
> *
> Instead of formatting output in reduce, you set it in map phase when you
> set the value for mapper. In that you can set according to our formayt
> e.g. word.set(fname+" "+lname);
>        and give it to output collector
>
>
> *2:- and how to make output in different directories *
> *according to reducer values.
>
> *Refer this link, here is the solution*:
> *
>
> https://sites.google.com/site/hadoopandhive/home/how-to-write-output-to-multiple-named-files-in-hadoop-using-multipletextoutputformat
>
>
>
> --
> Regards,
> Bhavesh Shah
>
>
> On Mon, Jan 9, 2012 at 5:31 PM, vikas Srivastava <hadoophive@gmail.com>wrote:
>
>> Hi folks,
>>
>> i have few question like
>>
>> 1:- How to format output from reduce( like default is tab separator can
>> we make it "," separator)
>> 2:- and how to make output in different directories according to reducer
>> values.
>>
>>
>> Thanks in advance
>>
>> r
>>
>
>
>
>

Mime
View raw message