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 # dev >> Check for schema backwards compatibility


Copy link to this message
-
Check for schema backwards compatibility
In AVRO-816, there is an implementation of a method that will check to see
if one schema subsumes another based on the field definitions.  I would
like a tool that can check if one schema is backwards compatible with
another -- that a record written with schema version 1 can be read with
schema version 2.

For instance, let's say I had a schema for a person record that originally
looked like this:

{
  "type": "record",
  "name": "Person",
  "fields": [
    {"name": "username", "type": "string"},
    {"name": "password", "type": "string"},
    {"name": "joined_on", "type": "long"}
  ]
}

I want to change the schema by adding a field.  I know that this will be a
backwards compatible change as long as the field has a default set, but I
would like to have a tool that can verify this for me as a type of static
analysis.

Has there been discussion of the need fot this type of tool?  Would other
people find it useful?

Thanks.

Jeff
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