avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kleppmann <mkleppm...@linkedin.com>
Subject Re: Importing Java class in Avro IDL
Date Wed, 14 May 2014 08:35:09 GMT
Hi Rohini,

Avro schemas can only refer to types defined within Avro. Referring to a Java type would break
Avro's cross-language compatibility. I'm afraid you'll need to create an Avro schema that
is the equivalent of Java class B.


On 13 May 2014, at 18:27, Rohini Uppuluri <rohini@glassdoor.com<mailto:rohini@glassdoor.com>>

I am looking to using avro serialization for our data. I see that we can import avro idl within
another idl file.
I was wondering if there was a way we could import java object as I have a use case for the

For example:

Class B has:
  String element1;
  A a;


And A is in another project.
Class A {
    String elem1;
   String elem2;
   int id;

I am trying to definite avro schema for B.  A is from a totally different project that does
not use avro.

I could do it after code generation but I was wondering if there was any other way to do it.


View raw message