Class SupersetSchemaGeneratorWithCustomProp
- java.lang.Object
-
- com.linkedin.venice.controller.supersetschema.SupersetSchemaGeneratorWithCustomProp
-
- All Implemented Interfaces:
SupersetSchemaGenerator
public class SupersetSchemaGeneratorWithCustomProp extends java.lang.Object implements SupersetSchemaGenerator
This class would copy the specifiedcustomProp
from the latest value schema to the generated superset schema and in the meantime, the compare method in this impl will consider this extra property as well.
-
-
Constructor Summary
Constructors Constructor Description SupersetSchemaGeneratorWithCustomProp(java.lang.String customProp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
compareSchema(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.Schema
generateSupersetSchema(org.apache.avro.Schema existingSchema, org.apache.avro.Schema newSchema)
Generate the superset schema based on two schemas.SchemaEntry
generateSupersetSchemaFromSchemas(java.util.Collection<SchemaEntry> schemas)
Function to generate a superset based on all the input schemas.java.lang.String
toString()
-
-
-
Method Detail
-
generateSupersetSchemaFromSchemas
public SchemaEntry generateSupersetSchemaFromSchemas(java.util.Collection<SchemaEntry> schemas)
Description copied from interface:SupersetSchemaGenerator
Function to generate a superset based on all the input schemas.- Specified by:
generateSupersetSchemaFromSchemas
in interfaceSupersetSchemaGenerator
- Returns:
SchemaEntry
to 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:SupersetSchemaGenerator
Compare whether two schemas are equal or not with the consideration of superset schema.- Specified by:
compareSchema
in interfaceSupersetSchemaGenerator
-
generateSupersetSchema
public org.apache.avro.Schema generateSupersetSchema(org.apache.avro.Schema existingSchema, org.apache.avro.Schema newSchema)
Description copied from interface:SupersetSchemaGenerator
Generate the superset schema based on two schemas.- Specified by:
generateSupersetSchema
in interfaceSupersetSchemaGenerator
- Parameters:
existingSchema
- : existing value schema or superset schemanewSchema
- : the new value schema.- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-