Package com.linkedin.venice.schema
Class SchemaData
java.lang.Object
com.linkedin.venice.schema.SchemaData
This class is used to store all the schemas related to a given store:
1. key schema
2. value schemas
3. partial update schemas
4. replication metadata schemas
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDerivedSchema(DerivedSchemaEntry derivedSchemaEntry) voidaddReplicationMetadataSchema(RmdSchemaEntry rmdSchemaEntry) voidaddValueSchema(SchemaEntry valueSchema) voiddeleteValueSchema(SchemaEntry valueSchema) getDerivedSchema(int valueSchemaId, int derivedSchemaId) getDerivedSchemaId(String schemaStr) intgetReplicationMetadataSchema(int valueSchemaId, int replicationMetadataVersionId) intgetSchemaID(SchemaEntry entry) Return the schema ID of any schema that has the same parsing canonical form as the schema provided.getValueSchema(int id) booleanhasRmdSchema(int valueSchemaId) booleanhasUpdateSchema(int valueSchemaId) voidsetKeySchema(SchemaEntry keySchema)
-
Field Details
-
UNKNOWN_SCHEMA_ID
public static final int UNKNOWN_SCHEMA_ID- See Also:
-
INVALID_VALUE_SCHEMA_ID
public static final int INVALID_VALUE_SCHEMA_ID- See Also:
-
DUPLICATE_VALUE_SCHEMA_CODE
public static final int DUPLICATE_VALUE_SCHEMA_CODE- See Also:
-
-
Constructor Details
-
SchemaData
-
-
Method Details
-
getStoreName
-
getKeySchema
- Returns:
- the key
SchemaEntry, which may temporarily be null soon after store initialization...
-
setKeySchema
-
getValueSchema
-
addValueSchema
-
getDerivedSchema
-
getDerivedSchemas
-
getDerivedSchemaId
-
addDerivedSchema
-
getMaxValueSchemaId
public int getMaxValueSchemaId() -
getSchemaID
Return the schema ID of any schema that has the same parsing canonical form as the schema provided.- Parameters:
entry- TheSchemaEntryfor which the schema ID is needed- Returns:
- The ID of the schema that has the same parsing canonical form as the schema provided
-
getValueSchemas
-
getReplicationMetadataSchema
public RmdSchemaEntry getReplicationMetadataSchema(int valueSchemaId, int replicationMetadataVersionId) -
getReplicationMetadataSchemas
-
addReplicationMetadataSchema
-
hasUpdateSchema
public boolean hasUpdateSchema(int valueSchemaId) -
hasRmdSchema
public boolean hasRmdSchema(int valueSchemaId) -
deleteValueSchema
-