You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Joey Echeverria <jo...@cloudera.com> on 2014/06/20 22:50:00 UTC

Passing Schema objects through Avro RPC

Has anyone built an Avro RPC interface that includes a method that returns
Avro Schema objects?

I've built my protocol using the reflect APIs, but because Schema doesn't
have an empty constructor, I get a NoSuchMethodException when trying to
deserialize on the client.

-Joey

Re: Passing Schema objects through Avro RPC

Posted by Joey Echeverria <jo...@cloudera.com>.
That would definitely help, I'll take a look at it!

I worked around it for the moment by creating a CustomEncoding that encodes
using Schema#toString() and decodes using Parser#parse(String). I then
annotated my Schema field
with @AvroEncode(using=SchemaAsStringEncoding.class).

-Joey


On Sat, Jun 21, 2014 at 9:57 AM, Harsh J <ha...@cloudera.com> wrote:

> Hey Joey,
>
> Are you perhaps looking for https://issues.apache.org/jira/browse/AVRO-251
> ?
>
> On Sat, Jun 21, 2014 at 2:20 AM, Joey Echeverria <jo...@cloudera.com>
> wrote:
> > Has anyone built an Avro RPC interface that includes a method that
> returns
> > Avro Schema objects?
> >
> > I've built my protocol using the reflect APIs, but because Schema doesn't
> > have an empty constructor, I get a NoSuchMethodException when trying to
> > deserialize on the client.
> >
> > -Joey
>
>
>
> --
> Harsh J
>



-- 
Joey Echeverria

Re: Passing Schema objects through Avro RPC

Posted by Harsh J <ha...@cloudera.com>.
Hey Joey,

Are you perhaps looking for https://issues.apache.org/jira/browse/AVRO-251?

On Sat, Jun 21, 2014 at 2:20 AM, Joey Echeverria <jo...@cloudera.com> wrote:
> Has anyone built an Avro RPC interface that includes a method that returns
> Avro Schema objects?
>
> I've built my protocol using the reflect APIs, but because Schema doesn't
> have an empty constructor, I get a NoSuchMethodException when trying to
> deserialize on the client.
>
> -Joey



-- 
Harsh J