Class DefaultSupersetSchemaGenerator
java.lang.Object
com.linkedin.venice.controller.supersetschema.DefaultSupersetSchemaGenerator
- All Implemented Interfaces:
SupersetSchemaGenerator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancompareSchema(org.apache.avro.Schema s1, org.apache.avro.Schema s2) Compare whether two schemas are equal or not with the consideration of superset schema.org.apache.avro.SchemagenerateSupersetSchema(org.apache.avro.Schema existingSchema, org.apache.avro.Schema newSchema) Generate the superset schema based on two schemas.Function to generate a superset based on all the input schemas.
-
Constructor Details
-
DefaultSupersetSchemaGenerator
public DefaultSupersetSchemaGenerator()
-
-
Method Details
-
generateSupersetSchemaFromSchemas
Description copied from interface:SupersetSchemaGeneratorFunction to generate a superset based on all the input schemas.- Specified by:
generateSupersetSchemaFromSchemasin interfaceSupersetSchemaGenerator- Returns:
SchemaEntryto contain the generated superset schema and the corresponding schema id.
-
compareSchema
public boolean compareSchema(org.apache.avro.Schema s1, org.apache.avro.Schema s2) Description copied from interface:SupersetSchemaGeneratorCompare whether two schemas are equal or not with the consideration of superset schema.- Specified by:
compareSchemain interfaceSupersetSchemaGenerator
-
generateSupersetSchema
public org.apache.avro.Schema generateSupersetSchema(org.apache.avro.Schema existingSchema, org.apache.avro.Schema newSchema) Description copied from interface:SupersetSchemaGeneratorGenerate the superset schema based on two schemas.- Specified by:
generateSupersetSchemain interfaceSupersetSchemaGenerator- Parameters:
existingSchema- : existing value schema or superset schemanewSchema- : the new value schema.- Returns:
-