Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro >> mail # user >> Has anyone developed a utility to tell what is missing from a record?


Copy link to this message
-
Re: Has anyone developed a utility to tell what is missing from a record?
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
created).

On 4/4/13 6:58 AM, "Jonathan Coveney" <[EMAIL PROTECTED]> 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
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB