You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Mark Kerzner <ma...@gmail.com> on 2009/10/02 03:54:53 UTC

OutputCollector: key and value are separated by tab, why?

Hi,
that is what I observe, that in the resulting text file the two are
separated by a tab. Can I change it, is it in any way configurable?

Thank you,
Mark

Re: OutputCollector: key and value are separated by tab, why?

Posted by Mark Kerzner <ma...@gmail.com>.
Kevin,
worked like a charm!

Mark

On Thu, Oct 1, 2009 at 10:11 PM, Kevin Weil <ke...@gmail.com> wrote:

> Assuming you're using TextOutputFormat, you can set it in your job
> configuration during setup:
> conf.set("mapred.textoutputformat.separator", ",");
>
> would make the separator a comma.
>
> Kevin
>
> On Thu, Oct 1, 2009 at 6:54 PM, Mark Kerzner <ma...@gmail.com>
> wrote:
>
> > Hi,
> > that is what I observe, that in the resulting text file the two are
> > separated by a tab. Can I change it, is it in any way configurable?
> >
> > Thank you,
> > Mark
> >
>

Re: OutputCollector: key and value are separated by tab, why?

Posted by Kevin Weil <ke...@gmail.com>.
Assuming you're using TextOutputFormat, you can set it in your job
configuration during setup:
conf.set("mapred.textoutputformat.separator", ",");

would make the separator a comma.

Kevin

On Thu, Oct 1, 2009 at 6:54 PM, Mark Kerzner <ma...@gmail.com> wrote:

> Hi,
> that is what I observe, that in the resulting text file the two are
> separated by a tab. Can I change it, is it in any way configurable?
>
> Thank you,
> Mark
>

Re: OutputCollector: key and value are separated by tab, why?

Posted by Jason Venner <ja...@gmail.com>.
They are separated by a tab, so that the KeyValueLineRecordReader can read
the output.

In hadoop 19, the paramter mapred.textoutputformat.separator can be set to
an arbitrary string which will be used as the separator for
TextOutputFormat.


On Thu, Oct 1, 2009 at 6:54 PM, Mark Kerzner <ma...@gmail.com> wrote:

> Hi,
> that is what I observe, that in the resulting text file the two are
> separated by a tab. Can I change it, is it in any way configurable?
>
> Thank you,
> Mark
>



-- 
Pro Hadoop, a book to guide you from beginner to hadoop mastery,
http://www.amazon.com/dp/1430219424?tag=jewlerymall
www.prohadoopbook.com a community for Hadoop Professionals