Package com.linkedin.davinci.consumer
Class VeniceChangelogConsumerClientFactory
java.lang.Object
com.linkedin.davinci.consumer.VeniceChangelogConsumerClientFactory
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface -
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
ConstructorsConstructorDescriptionVeniceChangelogConsumerClientFactory(ChangelogClientConfig globalChangelogClientConfig, io.tehuti.metrics.MetricsRepository metricsRepository) -
Method Summary
Modifier and TypeMethodDescriptionvoidderegisterClient(String consumerName) Removes client from the map, so it be cleaned up by Garbage Collection<K,V> BootstrappingVeniceChangelogConsumer<K, V> getBootstrappingChangelogConsumer(String storeName) <K,V> BootstrappingVeniceChangelogConsumer<K, V> getBootstrappingChangelogConsumer(String storeName, String consumerId) <K,V> BootstrappingVeniceChangelogConsumer<K, V> getBootstrappingChangelogConsumer(String storeName, String consumerId, Class<K> keyClass, Class<V> valueClass, org.apache.avro.Schema valueSchema) <K,V> BootstrappingVeniceChangelogConsumer<K, V> getBootstrappingChangelogConsumer(String storeName, String consumerId, Class<V> valueClass) <K,V> VeniceChangelogConsumer<K, V> getChangelogConsumer(String storeName) Default method to create aVeniceChangelogConsumergiven a storeName.<K,V> VeniceChangelogConsumer<K, V> getChangelogConsumer(String storeName, String consumerId) <K,V> VeniceChangelogConsumer<K, V> getChangelogConsumer(String storeName, String consumerId, Class<V> valueClass) Creates a VeniceChangelogConsumer with consumer id.<K,V> VeniceChangelogConsumer<K, V> getChangelogConsumer(String storeName, String consumerId, Class<V> valueClass, String viewNameOverride) protected static PubSubConsumerAdaptergetPubSubConsumer(ChangelogClientConfig changelogClientConfig, PubSubMessageDeserializer pubSubMessageDeserializer, String consumerName) <K,V> VeniceChangelogConsumer<K, V> getVersionSpecificChangelogConsumer(String storeName, int storeVersion, String consumerId) Subscribes to a specific version of a Venice store.protected voidsetConsumer(PubSubConsumerAdapter consumer) protected voidsetD2ControllerClient(D2ControllerClient d2ControllerClient) protected voidsetViewClassGetter(VeniceChangelogConsumerClientFactory.ViewClassGetter viewClassGetter)
-
Field Details
-
viewClassGetter
-
-
Constructor Details
-
VeniceChangelogConsumerClientFactory
public VeniceChangelogConsumerClientFactory(ChangelogClientConfig globalChangelogClientConfig, io.tehuti.metrics.MetricsRepository metricsRepository)
-
-
Method Details
-
setD2ControllerClient
-
setConsumer
-
getChangelogConsumer
Default method to create aVeniceChangelogConsumergiven a storeName. -
getChangelogConsumer
public <K,V> VeniceChangelogConsumer<K,V> getChangelogConsumer(String storeName, String consumerId) -
getChangelogConsumer
public <K,V> VeniceChangelogConsumer<K,V> getChangelogConsumer(String storeName, String consumerId, Class<V> valueClass) Creates a VeniceChangelogConsumer with consumer id. This is used to create multiple consumers so that each consumer can only subscribe to certain partitions. Multiple such consumers can work in parallel. -
getChangelogConsumer
public <K,V> VeniceChangelogConsumer<K,V> getChangelogConsumer(String storeName, String consumerId, Class<V> valueClass, String viewNameOverride) -
getBootstrappingChangelogConsumer
public <K,V> BootstrappingVeniceChangelogConsumer<K,V> getBootstrappingChangelogConsumer(String storeName) -
getBootstrappingChangelogConsumer
public <K,V> BootstrappingVeniceChangelogConsumer<K,V> getBootstrappingChangelogConsumer(String storeName, String consumerId, Class<K> keyClass, Class<V> valueClass, org.apache.avro.Schema valueSchema) - Parameters:
keyClass- TheSpecificRecordclass for your keyvalueClass- TheSpecificRecordclass for your valuevalueSchema- TheSchemafor your values
-
getBootstrappingChangelogConsumer
public <K,V> BootstrappingVeniceChangelogConsumer<K,V> getBootstrappingChangelogConsumer(String storeName, String consumerId, Class<V> valueClass) -
getBootstrappingChangelogConsumer
public <K,V> BootstrappingVeniceChangelogConsumer<K,V> getBootstrappingChangelogConsumer(String storeName, String consumerId) -
getVersionSpecificChangelogConsumer
public <K,V> VeniceChangelogConsumer<K,V> getVersionSpecificChangelogConsumer(String storeName, int storeVersion, String consumerId) Subscribes to a specific version of a Venice store. This is only intended for internal use. -
getPubSubConsumer
protected static PubSubConsumerAdapter getPubSubConsumer(ChangelogClientConfig changelogClientConfig, PubSubMessageDeserializer pubSubMessageDeserializer, String consumerName) -
setViewClassGetter
protected void setViewClassGetter(VeniceChangelogConsumerClientFactory.ViewClassGetter viewClassGetter) -
deregisterClient
Removes client from the map, so it be cleaned up by Garbage Collection
-