avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Carey <scottca...@apache.org>
Subject Re: Has anyone developed a utility to tell what is missing from a record?
Date Sat, 06 Apr 2013 20:42:06 GMT
Try GenericRecordBuilder.

For the Specific API, there are builders that will not let you construct an
object that can not be serialized.
The Generic API should have the same thing, but I am not 100% sure the
builder there covers it.

I have always avoided using any API that allows me to create an object that
is unsafe to serialize since finding out at serialization time is a huge
pain (and in my case, is often on a separate thread from the place it was

On 4/4/13 6:58 AM, "Jonathan Coveney" <jcoveney@gmail.com> wrote:

> I'm working on migrating an internally developed serialization format to Avro.
> In the process, there have been many cases where I made a mistake migrating
> the schema (I've automated it), and then avro cries that a record I'm trying
> to serialize doesn't match the schema. Generally, the error it gives doesn't
> help find the actual issue, and for a big enough record finding the issue can
> be tedious.
> I've thought about making a tool which, given the schema and the record would
> tell you what the issue is, but I'm wondering if this already exists? I
> suppose the error message could also include this information...
> Thanks
> Jon

View raw message