Thanks.  It looks like the fix of AVRO-1045 will resolve the issue.  Currently, 
we use a walk around to find the end of the data.  With this, we can extract 
data we want to create an instance of GenericRecord.

Ey-Chih Chow

On Mar 20, 2012, at 7:35 PM, Scott Carey wrote:

> Perhaps it is 
> https://issues.apache.org/jira/browse/AVRO-1045 
> 
> Are you creating a copy of the GenericRecord?
> 
> -Scott
> 
> 
> On 3/19/12 3:34 PM, "ey-chih chow" <[email protected]> wrote:
> 
>> Hi,
>> 
>> We got an Avro MapReduce job with the signature of the map function as 
>> follows:
>> 
>> 
>> public void map(ByteBuffer input, AvroCollector<Pair<Utf8, GenericRecord>> 
>> collector, Reporter reporter) throws IOException;
>> 
>> 
>> However, the position of the ByteBuffer input, i.e. input.position(), is 
>> always set to 0 when map() gets invoked.  With this, we can not extract data 
>> from input.  This is for the version of avro 1.5.4.  For the older versions 
>> of avro, input.position() is set to the end of the input data.  Is there 
>> anybody knows why this gets set to 0?  Or is this a bug?  
>> 
>> Ey-Chih Chow

Reply via email to