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 Luca Pireddu <pi...@crs4.it> on 2012/02/09 11:27:39 UTC

is it possible to specify an empty key-value separator for TextOutputFormat?

Hello list,

I'm trying to specify from the command line an empty string as the 
key-value separator for TextOutputFormat.

I'm specifying a blank as the value for the 
mapred.textoutputformat.separator property:

   -D mapred.textoutputformat.separator=""

And, when I look at the job's configuration file (job.xml) this setting 
seems to be picked up correctly.  However, the output format continues 
using a TAB to separate key and value when I specify an empty string.

Any way to convince it not to insert a separator (use the empty string)?


ps:  I'm using pipes so I can't specify a null key or value.


-- 
Luca Pireddu
CRS4 - Distributed Computing Group
Loc. Pixina Manna Edificio 1
09010 Pula (CA), Italy
Tel: +39 0709250452

Re: is it possible to specify an empty key-value separator for TextOutputFormat?

Posted by Luca Pireddu <pi...@crs4.it>.
Hi Vikas,

On 02/09/2012 11:53 AM, hadoop hive wrote:
> hey luca,
>
> you can use
>
> conf.set("*mapred.textoutputformat.separator*", " ");
>
> hope it works fine
>
> regards
> Vikas Srivastava


I'm using pipes for this task.  I can't specify the configuration 
property via Java code.  In addition, I don't want it to insert a space 
as a separator :-)

Thanks,

Luca




> On Thu, Feb 9, 2012 at 3:57 PM, Luca Pireddu<pi...@crs4.it>  wrote:
>
>> Hello list,
>>
>> I'm trying to specify from the command line an empty string as the
>> key-value separator for TextOutputFormat.
>>
>> I'm specifying a blank as the value for the mapred.textoutputformat.**separator
>> property:
>>
>>   -D mapred.textoutputformat.**separator=""
>>
>> And, when I look at the job's configuration file (job.xml) this setting
>> seems to be picked up correctly.  However, the output format continues
>> using a TAB to separate key and value when I specify an empty string.
>>
>> Any way to convince it not to insert a separator (use the empty string)?
>>
>>
>> ps:  I'm using pipes so I can't specify a null key or value.
>>
>>
>> --
>> Luca Pireddu
>> CRS4 - Distributed Computing Group
>> Loc. Pixina Manna Edificio 1
>> 09010 Pula (CA), Italy
>> Tel: +39 0709250452

Re: is it possible to specify an empty key-value separator for TextOutputFormat?

Posted by hadoop hive <ha...@gmail.com>.
hey luca,

you can use

conf.set("*mapred.textoutputformat.separator*", " ");

hope it works fine

regards
Vikas Srivastava

On Thu, Feb 9, 2012 at 3:57 PM, Luca Pireddu <pi...@crs4.it> wrote:

> Hello list,
>
> I'm trying to specify from the command line an empty string as the
> key-value separator for TextOutputFormat.
>
> I'm specifying a blank as the value for the mapred.textoutputformat.**separator
> property:
>
>  -D mapred.textoutputformat.**separator=""
>
> And, when I look at the job's configuration file (job.xml) this setting
> seems to be picked up correctly.  However, the output format continues
> using a TAB to separate key and value when I specify an empty string.
>
> Any way to convince it not to insert a separator (use the empty string)?
>
>
> ps:  I'm using pipes so I can't specify a null key or value.
>
>
> --
> Luca Pireddu
> CRS4 - Distributed Computing Group
> Loc. Pixina Manna Edificio 1
> 09010 Pula (CA), Italy
> Tel: +39 0709250452
>