hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <ha...@cloudera.com>
Subject Re: Handling bad records
Date Tue, 28 Feb 2012 05:53:04 GMT
Mohit,

Use the MultipleOutputs API:
http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/mapred/lib/MultipleOutputs.html
to have a named output of bad records. There is an example of use
detailed on the link.

On Tue, Feb 28, 2012 at 3:48 AM, Mohit Anchlia <mohitanchlia@gmail.com> wrote:
> What's the best way to write records to a different file? I am doing xml
> processing and during processing I might come accross invalid xml format.
> Current I have it under try catch block and writing to log4j. But I think
> it would be better to just write it to an output file that just contains
> errors.



-- 
Harsh J

Mime
View raw message