Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Avro >> mail # user >> Anonymous record schemas in data files

Eric Sammer 2013-03-04, 07:50
Doug Cutting 2013-03-04, 17:31
Eric Sammer 2013-03-04, 17:57
Doug Cutting 2013-03-04, 18:16
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