Package com.linkedin.venice.meta
Interface ReadWriteSchemaRepository
- All Superinterfaces:
ReadOnlySchemaRepository
,VeniceResource
- All Known Implementing Classes:
HelixReadWriteSchemaRepository
,HelixReadWriteSchemaRepositoryAdapter
-
Method Summary
Modifier and TypeMethodDescriptionaddDerivedSchema
(String storeName, String schemaStr, int valueSchemaId) Add a new derived schema for the given store and value schema idaddDerivedSchema
(String storeName, String schemaStr, int valueSchemaId, int derivedSchemaId) Add a new derived schema for the given store by specifying derived schema id.addReplicationMetadataSchema
(String storeName, int valueSchemaId, String replicationMetadataSchemaStr, int replicationMetadataVersionId) default SchemaEntry
addValueSchema
(String storeName, String schemaStr) Add a new value schema for the given storeaddValueSchema
(String storeName, String schemaStr, int schemaId) Add a new value schema for the given store by specifying schema id.addValueSchema
(String storeName, String schemaStr, DirectionalSchemaCompatibilityType expectedCompatibilityType) Add a new value schema for the given storeinitKeySchema
(String storeName, String schemaStr) Set up key schema for the given storeint
preCheckDerivedSchemaAndGetNextAvailableId
(String storeName, int valueSchemaId, String derivedSchemaStr) int
preCheckValueSchemaAndGetNextAvailableId
(String storeName, String valueSchemaStr, DirectionalSchemaCompatibilityType expectedCompatibilityType) removeDerivedSchema
(String storeName, int valueSchemaId, int derivedSchemaId) Remove an existing derived schemavoid
removeValueSchema
(String storeName, int schemaID) Methods inherited from interface com.linkedin.venice.meta.ReadOnlySchemaRepository
getDerivedSchema, getDerivedSchemaId, getDerivedSchemas, getKeySchema, getLatestDerivedSchema, getLatestDerivedSchema, getReplicationMetadataSchema, getReplicationMetadataSchemas, getSupersetOrLatestValueSchema, getSupersetSchema, getValueSchema, getValueSchemaId, getValueSchemas, hasValueSchema
Methods inherited from interface com.linkedin.venice.VeniceResource
clear, refresh
-
Method Details
-
initKeySchema
Set up key schema for the given store -
addValueSchema
Add a new value schema for the given store -
addValueSchema
SchemaEntry addValueSchema(String storeName, String schemaStr, DirectionalSchemaCompatibilityType expectedCompatibilityType) Add a new value schema for the given store -
addValueSchema
Add a new value schema for the given store by specifying schema id. This API is mostly intended to be used in cross-colo mode. When there are multiple colos, we'd like to have consistent value id across colos, so that deserializer can work properly while reading records. Caller should figure out the schema id number by themselves. TODO: Might want to remove it from the interface and make it invisible from the outside -
addDerivedSchema
Add a new derived schema for the given store and value schema id -
addDerivedSchema
DerivedSchemaEntry addDerivedSchema(String storeName, String schemaStr, int valueSchemaId, int derivedSchemaId) Add a new derived schema for the given store by specifying derived schema id. Mostly used in cross-colo mode. -
removeDerivedSchema
Remove an existing derived schema- Returns:
- the derived schema that is deleted or null if the schema doesn't exist
-
preCheckValueSchemaAndGetNextAvailableId
int preCheckValueSchemaAndGetNextAvailableId(String storeName, String valueSchemaStr, DirectionalSchemaCompatibilityType expectedCompatibilityType) -
preCheckDerivedSchemaAndGetNextAvailableId
-
addReplicationMetadataSchema
RmdSchemaEntry addReplicationMetadataSchema(String storeName, int valueSchemaId, String replicationMetadataSchemaStr, int replicationMetadataVersionId) -
removeValueSchema
-