Package com.linkedin.venice.schema
Class SchemaRepoBackedSchemaReader
- java.lang.Object
-
- com.linkedin.venice.schema.SchemaRepoBackedSchemaReader
-
- All Implemented Interfaces:
SchemaReader
,java.io.Closeable
,java.lang.AutoCloseable
public class SchemaRepoBackedSchemaReader extends java.lang.Object implements SchemaReader
-
-
Constructor Summary
Constructors Constructor Description SchemaRepoBackedSchemaReader(ReadOnlySchemaRepository schemaRepository, java.lang.String storeName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
org.apache.avro.Schema
getKeySchema()
DerivedSchemaEntry
getLatestUpdateSchema()
org.apache.avro.Schema
getLatestValueSchema()
java.lang.Integer
getLatestValueSchemaId()
Get the latest value schema id.org.apache.avro.Schema
getUpdateSchema(int valueSchemaId)
org.apache.avro.Schema
getValueSchema(int id)
int
getValueSchemaId(org.apache.avro.Schema schema)
Return the schema ID of any schema that has the same parsing canonical form as the schema provided.
-
-
-
Constructor Detail
-
SchemaRepoBackedSchemaReader
public SchemaRepoBackedSchemaReader(ReadOnlySchemaRepository schemaRepository, java.lang.String storeName)
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
getKeySchema
public org.apache.avro.Schema getKeySchema()
- Specified by:
getKeySchema
in interfaceSchemaReader
-
getValueSchema
public org.apache.avro.Schema getValueSchema(int id)
- Specified by:
getValueSchema
in interfaceSchemaReader
-
getValueSchemaId
public int getValueSchemaId(org.apache.avro.Schema schema)
Description copied from interface:SchemaReader
Return the schema ID of any schema that has the same parsing canonical form as the schema provided.- Specified by:
getValueSchemaId
in interfaceSchemaReader
- Parameters:
schema
- The schema for which the schema ID is needed- Returns:
- The ID of the schema that has the same parsing canonical form as the schema provided
-
getLatestValueSchema
public org.apache.avro.Schema getLatestValueSchema()
- Specified by:
getLatestValueSchema
in interfaceSchemaReader
-
getLatestValueSchemaId
public java.lang.Integer getLatestValueSchemaId()
Description copied from interface:SchemaReader
Get the latest value schema id. This may be different from the value schema with the largest id if the superset schema is not the value schema with the largest id- Specified by:
getLatestValueSchemaId
in interfaceSchemaReader
-
getUpdateSchema
public org.apache.avro.Schema getUpdateSchema(int valueSchemaId)
- Specified by:
getUpdateSchema
in interfaceSchemaReader
-
getLatestUpdateSchema
public DerivedSchemaEntry getLatestUpdateSchema()
- Specified by:
getLatestUpdateSchema
in interfaceSchemaReader
-
-