Class SchemaEvolutionValidator

  extended by voldemort.serialization.avro.versioned.SchemaEvolutionValidator

public class SchemaEvolutionValidator
extends java.lang.Object

Provides methods to compare schemas for schema evolution and indicate any potential problems.

Jemiah Westerman

Nested Class Summary
static class SchemaEvolutionValidator.Message
Constructor Summary
Method Summary
static java.util.List<SchemaEvolutionValidator.Message> checkBackwardCompatability(org.apache.avro.Schema oldSchema, org.apache.avro.Schema newSchema, java.lang.String name)
          Compare two schemas to see if they are backward compatible.
static void checkSchemaCompatibility(SerializerDefinition serDef)
static void main(java.lang.String[] args)
          This main method provides an easy command line tool to compare two schemas.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public SchemaEvolutionValidator()
Method Detail


public static void main(java.lang.String[] args)
This main method provides an easy command line tool to compare two schemas.


public static java.util.List<SchemaEvolutionValidator.Message> checkBackwardCompatability(org.apache.avro.Schema oldSchema,
                                                                                          org.apache.avro.Schema newSchema,
                                                                                          java.lang.String name)
Compare two schemas to see if they are backward compatible. Returns a list of validation messages.
  • ERROR messages indicate the schemas are not backward compatible and the new schema should not be allowed. If an ERROR schema is uploaded, clients will not be able to read existing data.
  • WARN messages indicate that the new schemas may cause problems for existing clients. However, once all clients are updated to this version of the schema they should be able to read new and existing data.
  • INFO messages note changes to the schema, basically providing a friendly list of what has changed from one version to the next. This includes changes like the addition of fields, changes to default values, etc.

    oldSchema - the original schema
    newSchema - the new schema
    name - the schema name
    list of messages about the schema evolution

  • checkSchemaCompatibility

    public static void checkSchemaCompatibility(SerializerDefinition serDef)

    Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu