You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Dave Beech <da...@paraliatech.com> on 2012/09/21 15:25:48 UTC

Configure method being called twice on AvroMapper?

Hi,

Is there a reason why the configure method is called twice on
AvroMapper instances?

I can see that it would be called once by reflection when the instance
is created using Hadoop's ReflectionUtils (HadoopMapper, line 43), but
then it is also called again explicitly a couple of lines later. In a
comment in one of the unit tests (TestWeather.java) it even says "//
gets called twice for some reason, so loosen this check" !

Isn't the second call redundant?

Thanks,
Dave

Re: Configure method being called twice on AvroMapper?

Posted by Doug Cutting <cu...@apache.org>.
This looks like a bug to me.  Can you please file an issue in Jira?

https://issues.apache.org/jira/browse/AVRO

Thanks,

Doug

On Fri, Sep 21, 2012 at 6:25 AM, Dave Beech <da...@paraliatech.com> wrote:
> Hi,
>
> Is there a reason why the configure method is called twice on
> AvroMapper instances?
>
> I can see that it would be called once by reflection when the instance
> is created using Hadoop's ReflectionUtils (HadoopMapper, line 43), but
> then it is also called again explicitly a couple of lines later. In a
> comment in one of the unit tests (TestWeather.java) it even says "//
> gets called twice for some reason, so loosen this check" !
>
> Isn't the second call redundant?
>
> Thanks,
> Dave