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

Switch to Plain View
Avro, mail # dev - Check for schema backwards compatibility


Copy link to this message
-
Check for schema backwards compatibility
Jeff Kolesky 2012-11-16, 23:37
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
+
Doug Cutting 2012-11-16, 23:54
+
Jeff Kolesky 2012-11-18, 04:04
+
Doug Cutting 2012-11-19, 18:54
+
Jeff Kolesky 2012-11-19, 19:12
+
Doug Cutting 2012-11-19, 19:18