public class SchemaCompatibility extends Object
| Modifier and Type | Class and Description | 
|---|---|
| static class  | SchemaCompatibility.Incompatibility | 
| static class  | SchemaCompatibility.SchemaCompatibilityResultImmutable class representing details about a particular schema pair
 compatibility check. | 
| static class  | SchemaCompatibility.SchemaCompatibilityTypeIdentifies the type of a schema compatibility result. | 
| static class  | SchemaCompatibility.SchemaIncompatibilityType | 
| static class  | SchemaCompatibility.SchemaPairCompatibilityProvides information about the compatibility of a single reader and writer
 schema pair. | 
| Modifier and Type | Field and Description | 
|---|---|
| static String | READER_WRITER_COMPATIBLE_MESSAGEMessage to annotate reader/writer schema pairs that are compatible. | 
| Modifier and Type | Method and Description | 
|---|---|
| static SchemaCompatibility.SchemaPairCompatibility | checkReaderWriterCompatibility(Schema reader,
                              Schema writer)Validates that the provided reader schema can be used to decode avro data
 written with the provided writer schema. | 
| static Schema.Field | lookupWriterField(Schema writerSchema,
                 Schema.Field readerField)Identifies the writer field that corresponds to the specified reader field. | 
| static boolean | schemaNameEquals(Schema reader,
                Schema writer)Tests the equality of two Avro named schemas. | 
public static final String READER_WRITER_COMPATIBLE_MESSAGE
public static SchemaCompatibility.SchemaPairCompatibility checkReaderWriterCompatibility(Schema reader, Schema writer)
reader - schema to check.writer - schema to check.public static boolean schemaNameEquals(Schema reader, Schema writer)
Matching includes reader name aliases.
reader - Named reader schema.writer - Named writer schema.public static Schema.Field lookupWriterField(Schema writerSchema, Schema.Field readerField)
Matching includes reader name aliases.
writerSchema - Schema of the record where to look for the writer field.readerField - Reader field to identify the corresponding writer field
                     of.Copyright © 2009–2020 The Apache Software Foundation. All rights reserved.