Package com.linkedin.venice.system.store
Class MetaStoreWriter
java.lang.Object
com.linkedin.venice.system.store.MetaStoreWriter
- All Implemented Interfaces:
Closeable,AutoCloseable
This class is to write metadata: store properties/key schema/value schemas/replica statuses to meta system store.
So far, only child fabric should write to it and in the future, we may want to support the write from parent fabric,
which can be used for the fabric buildup.
TODO: we may need to consider to close the corresponding VeniceWriter when the store is deleted.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMetaStoreWriter(TopicManager topicManager, VeniceWriterFactory writerFactory, HelixReadOnlyZKSharedSchemaRepository schemaRepo, PubSubTopicRepository pubSubTopicRepository, long closeTimeoutMs, int numOfConcurrentVwCloseOps) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()If numOfConcurrentVwCloseOps is set to -1, then all the VeniceWriters will be closed asynchronously and concurrently.getMetaStoreWriter(String metaStoreName) voidremoveMetaStoreWriter(String metaStoreName) This function should be used only for store deletion scenario.voidwriteHeartbeat(String storeName, long heartbeatTimestamp) voidwriteInUseValueSchema(String storeName, int versionNumber, int valueSchemaId) voidwriteStoreClusterConfig(StoreConfig storeConfig) WriteStoreConfigequivalent to the meta system store.voidwriteStoreKeySchemas(String storeName, Collection<SchemaEntry> keySchemas) voidwriteStoreProperties(String clusterName, Store store) This function should be invoked for any store metadata change.voidwriteStoreValueSchemas(String storeName, Collection<SchemaEntry> valueSchemas) This function should be invoked for any value schema changes, and the should contain all the value schemas since this operation will be a full PUT.
-
Field Details
-
KEY_STRING_STORE_NAME
- See Also:
-
KEY_STRING_CLUSTER_NAME
- See Also:
-
KEY_STRING_VERSION_NUMBER
- See Also:
-
KEY_STRING_PARTITION_ID
- See Also:
-
KEY_STRING_SCHEMA_ID
- See Also:
-
-
Constructor Details
-
Method Details
-
writeStoreProperties
This function should be invoked for any store metadata change. -
writeStoreKeySchemas
-
writeStoreValueSchemas
This function should be invoked for any value schema changes, and the should contain all the value schemas since this operation will be a full PUT. -
writeHeartbeat
-
writeInUseValueSchema
-
writeStoreClusterConfig
WriteStoreConfigequivalent to the meta system store. This is still only invoked by child controllers only. -
removeMetaStoreWriter
This function should be used only for store deletion scenario.- Parameters:
metaStoreName-
-
getMetaStoreWriter
-
close
If numOfConcurrentVwCloseOps is set to -1, then all the VeniceWriters will be closed asynchronously and concurrently. If numOfConcurrentVwCloseOps is set to a positive number, then the VeniceWriters will be closed with a bounded concurrency until timeout. Once timeout is reached, the remaining VeniceWriters will be closed asynchronously and concurrently.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-