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 ncardoso <nc...@xldb.di.fc.ul.pt> on 2008/04/08 21:42:46 UTC

Headers and footers on Hadoop output results

Hello.

I'm using Hadoop to process several XML files, each with several XML
records, through a group of Linux servers. I am using an XMLInputFormat that
I found 
http://www.nabble.com/map-reduce-function-on-xml-string-td15816818.html here
in Nabble , and I'm using the TextOutputFormat with an overrided write
funcion, to output XML. 

Yet, the XML needs its root tag and the ?xml line. Where is the best place
to place two writing functions like header() and footer()? I've tried, but
all I manage was to write in the local task, not in the synchronized
"part-0000" file. 
-- 
View this message in context: http://www.nabble.com/Headers-and-footers-on-Hadoop-output-results-tp16571385p16571385.html
Sent from the Hadoop lucene-users mailing list archive at Nabble.com.


Re: Headers and footers on Hadoop output results

Posted by Riccardo Boscolo <dr...@netseer.com>.
You can write your own output format (extending TextOutputFormat) and simply
add the header when you create the output file, and the footer right before
you close it.

RB

On Tue, Apr 8, 2008 at 12:42 PM, ncardoso <nc...@xldb.di.fc.ul.pt> wrote:

>
> Hello.
>
> I'm using Hadoop to process several XML files, each with several XML
> records, through a group of Linux servers. I am using an XMLInputFormat
> that
> I found
> http://www.nabble.com/map-reduce-function-on-xml-string-td15816818.htmlhere
> in Nabble , and I'm using the TextOutputFormat with an overrided write
> funcion, to output XML.
>
> Yet, the XML needs its root tag and the ?xml line. Where is the best place
> to place two writing functions like header() and footer()? I've tried, but
> all I manage was to write in the local task, not in the synchronized
> "part-0000" file.
> --
> View this message in context:
> http://www.nabble.com/Headers-and-footers-on-Hadoop-output-results-tp16571385p16571385.html
> Sent from the Hadoop lucene-users mailing list archive at Nabble.com.
>
>


-- 
-------------------------------
Riccardo Boscolo, PhD
V.P. of Core Technology
Netseer Inc.
11943 Montana Ave, Suite 200
Los Angeles, CA 90049
T: 310-597-4482
F: 310-597-4489
Email: drboscolo@netseer.com
-------------------------------