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

Switch to Threaded View
Avro, mail # user - Version Naming Convention / Namespaces


Copy link to this message
-
Re: Version Naming Convention / Namespaces
Martin Kleppmann 2013-07-23, 20:20
The "." is a namespace separator by design:
http://avro.apache.org/docs/current/spec.html#Names

The best way of handling versioning in Avro is not to change the name of
your records at all, and just rely on schema evolution (
http://avro.apache.org/docs/current/spec.html#Schema+Resolution). That
allows you to add or remove fields, and change field types, within certain
limitations to ensure compatibility. In fact, you make life harder for
yourself if you change names, because then you have to maintain aliases to
the old names.

Martin
On 23 July 2013 10:24, ellisdp <[EMAIL PROTECTED]> wrote:

> We had wanted to use a version number naming convention to indicate
> successive versions of user data types, for example if we define an Avro
> "Employee" record we intended to name this:
>
> Employee.V1_0
> Employee.V1_1
>
> to indicate successive changes to the schema.
>
> However we have found that some of the Avro tooling (for example, code
> generation, and naming of embedded schema types) interprets the "." to be a
> namespace separator, and generates a namespace of "Employee" and a record
> name of "V1_0", which obviously is not what we intended.
>
> Have others encountered this issue - is there a way around it? Or is there
> an alternative common convention for version naming in Avro?
>
> Thanks.
>
>
>
>
> --
> View this message in context:
> http://apache-avro.679487.n3.nabble.com/Version-Naming-Convention-Namespaces-tp4027858.html
> Sent from the Avro - Users mailing list archive at Nabble.com.
>