hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adi <adi.pan...@gmail.com>
Subject Writing to Mapper Context from RecordReader
Date Thu, 07 Apr 2011 14:42:21 GMT
using 0.21.0. I have implemented a custom InputFormat. The RecordReader
extends org.apache.hadoop.mapreduce.RecordReader<KEYIN, VALUEIN>

The sample I looked at threw an IOException when there was incompatible
input line. But I am not sure who is supposed to catch and handle this
exception. The task just failed when this exception was thrown.
I changed the implementation to log an error instead of throwing an
IOException but the best thing would be to write to the output via context
and report this error.
But the RecordReader does not have a handle to the Mapper context.
Is there a way to get a handle to the current Mapper context and write a
message via the Mapper context from the RecordReader?
Any other suggestions on handling bad input data when implementing Custom
InputFormat?

Thanks.

-Adi

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message