Top Description Methods
org.apache.avro

public Interface SchemaValidator

Known Direct Implementers
org.apache.avro.ValidateAll, org.apache.avro.ValidateLatest

A SchemaValidator has one method, which validates that a Schema is compatible with the other schemas provided.

What makes one Schema compatible with another is not part of the interface contract.

Method Summary

Modifier and TypeMethod and Description
public void
validate(Schema
The schema to validate
toValidate
,
Iterable<Schema>
The schemas to validate against, in order from most recent to latest if applicable
existing
)

Validate one schema against others.

Method Detail

validateback to summary
public void validate(Schema toValidate, Iterable<Schema> existing) throws SchemaValidationException

Validate one schema against others. The order of the schemas to validate against is chronological from most recent to oldest, if there is a natural chronological order. This allows some validators to identify which schemas are the most "recent" in order to validate only against the most recent schema(s).

Parameters
toValidate:Schema

The schema to validate

existing:Iterable<Schema>

The schemas to validate against, in order from most recent to latest if applicable

Exceptions
SchemaValidationException:
if the schema fails to validate.