Package org.apache.avro
Class ValidateAll
java.lang.Object
org.apache.avro.ValidateAll
- All Implemented Interfaces:
SchemaValidator
A SchemaValidator
for validating the provided schema against all
schemas in the Iterable in validate(Schema, Iterable)
.
Uses the SchemaValidationStrategy
provided in the constructor to
validate the Schema
against each Schema in the Iterable, in Iterator
order, via SchemaValidationStrategy.validate(Schema, Schema)
.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ValidateAll
- Parameters:
strategy
- The strategy to use for validation of pairwise schemas.
-
-
Method Details
-
validate
public void validate(Schema toValidate, Iterable<Schema> schemasInOrder) throws SchemaValidationException Description copied from interface:SchemaValidator
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).- Specified by:
validate
in interfaceSchemaValidator
- Parameters:
toValidate
- The schema to validateschemasInOrder
- The schemas to validate against, in order from most recent to latest if applicable- Throws:
SchemaValidationException
- if the schema fails to validate.
-