Package com.linkedin.venice.meta
Interface ReadWriteSchemaRepository
-
- All Superinterfaces:
ReadOnlySchemaRepository
,VeniceResource
- All Known Implementing Classes:
HelixReadWriteSchemaRepository
,HelixReadWriteSchemaRepositoryAdapter
public interface ReadWriteSchemaRepository extends ReadOnlySchemaRepository
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description DerivedSchemaEntry
addDerivedSchema(java.lang.String storeName, java.lang.String schemaStr, int valueSchemaId)
Add a new derived schema for the given store and value schema idDerivedSchemaEntry
addDerivedSchema(java.lang.String storeName, java.lang.String schemaStr, int valueSchemaId, int derivedSchemaId)
Add a new derived schema for the given store by specifying derived schema id.RmdSchemaEntry
addReplicationMetadataSchema(java.lang.String storeName, int valueSchemaId, java.lang.String replicationMetadataSchemaStr, int replicationMetadataVersionId)
default SchemaEntry
addValueSchema(java.lang.String storeName, java.lang.String schemaStr)
Add a new value schema for the given storeSchemaEntry
addValueSchema(java.lang.String storeName, java.lang.String schemaStr, int schemaId)
Add a new value schema for the given store by specifying schema id.SchemaEntry
addValueSchema(java.lang.String storeName, java.lang.String schemaStr, DirectionalSchemaCompatibilityType expectedCompatibilityType)
Add a new value schema for the given storeSchemaEntry
initKeySchema(java.lang.String storeName, java.lang.String schemaStr)
Set up key schema for the given storeint
preCheckDerivedSchemaAndGetNextAvailableId(java.lang.String storeName, int valueSchemaId, java.lang.String derivedSchemaStr)
int
preCheckValueSchemaAndGetNextAvailableId(java.lang.String storeName, java.lang.String valueSchemaStr, DirectionalSchemaCompatibilityType expectedCompatibilityType)
DerivedSchemaEntry
removeDerivedSchema(java.lang.String storeName, int valueSchemaId, int derivedSchemaId)
Remove an existing derived schemavoid
removeValueSchema(java.lang.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 Detail
-
initKeySchema
SchemaEntry initKeySchema(java.lang.String storeName, java.lang.String schemaStr)
Set up key schema for the given store
-
addValueSchema
default SchemaEntry addValueSchema(java.lang.String storeName, java.lang.String schemaStr)
Add a new value schema for the given store
-
addValueSchema
SchemaEntry addValueSchema(java.lang.String storeName, java.lang.String schemaStr, DirectionalSchemaCompatibilityType expectedCompatibilityType)
Add a new value schema for the given store
-
addValueSchema
SchemaEntry addValueSchema(java.lang.String storeName, java.lang.String schemaStr, int schemaId)
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
DerivedSchemaEntry addDerivedSchema(java.lang.String storeName, java.lang.String schemaStr, int valueSchemaId)
Add a new derived schema for the given store and value schema id
-
addDerivedSchema
DerivedSchemaEntry addDerivedSchema(java.lang.String storeName, java.lang.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
DerivedSchemaEntry removeDerivedSchema(java.lang.String storeName, int valueSchemaId, int derivedSchemaId)
Remove an existing derived schema- Returns:
- the derived schema that is deleted or null if the schema doesn't exist
-
preCheckValueSchemaAndGetNextAvailableId
int preCheckValueSchemaAndGetNextAvailableId(java.lang.String storeName, java.lang.String valueSchemaStr, DirectionalSchemaCompatibilityType expectedCompatibilityType)
-
preCheckDerivedSchemaAndGetNextAvailableId
int preCheckDerivedSchemaAndGetNextAvailableId(java.lang.String storeName, int valueSchemaId, java.lang.String derivedSchemaStr)
-
addReplicationMetadataSchema
RmdSchemaEntry addReplicationMetadataSchema(java.lang.String storeName, int valueSchemaId, java.lang.String replicationMetadataSchemaStr, int replicationMetadataVersionId)
-
removeValueSchema
void removeValueSchema(java.lang.String storeName, int schemaID)
-
-