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 >> Anonymous record schemas in data files


Copy link to this message
-
Re: Anonymous record schemas in data files
On Mon, Mar 4, 2013 at 8:50 AM, Eric Sammer <[EMAIL PROTECTED]> wrote:
> All:
>
> I'm looking for some clarity on the use of anonymous records in Avro data
> files. Is this considered legal? 1.7.3 allows one to write a data file with
> DataFileWriter with an anonymous record schema that can't be read back which
> is not the nicest behavior. Here's a contrived example of a data file:
>
> esammer:~/ esammer$ ~/bin/avro-tool getmeta 1362381940987-1
> Exception in thread "main" org.apache.avro.SchemaParseException: No name in
> schema: {"type":"record","fields":[{"name":"word","type":"string"}]}

Records must have a name.
http://avro.apache.org/docs/current/spec.html#schema_record says so.

--
Francis Galiegue, [EMAIL PROTECTED]
JSON Schema in Java: http://json-schema-validator.herokuapp.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