Package com.linkedin.davinci.client
Class VersionSpecificAvroGenericDaVinciClient<K,V>
java.lang.Object
com.linkedin.davinci.client.AvroGenericDaVinciClient<K,V>
com.linkedin.davinci.client.VersionSpecificAvroGenericDaVinciClient<K,V>
- All Implemented Interfaces:
DaVinciClient<K,
,V> AvroGenericReadComputeStoreClient<K,
,V> AvroGenericStoreClient<K,
,V> Closeable
,AutoCloseable
Version-specific DaVinci client implementation that subscribes to a specific store version.
This is only intended for internal Venice use.
Must be used with
set to false. Otherwise, the client may subscribe to an unintended version based on what's on disk.
Key features:
- Subscribes to a specific version (does not follow version swaps)
- Validates version existence when subscribing
- Cannot be mixed with regular DaVinci clients on the same store with the same
{@link com.linkedin.davinci.DaVinciBackend} or JVM.
Please note that when the client is subscribed to the backup version, on restart
{@link com.linkedin.davinci.DaVinciBackend#functionToCheckWhetherStorageEngineShouldBeKeptOrNot(Optional)}
will automatically delete the backup version data on disk and it will have to reingest. We are ok with this
behavior because the plan is to use {@link DaVinciRecordTransformer} in diskless mode where the user will need to
prevent the PubSub position to seek to instead of relying on the {@link com.linkedin.venice.offsets.OffsetRecord}.
-
Field Summary
Fields inherited from class com.linkedin.davinci.client.AvroGenericDaVinciClient
DEFAULT_CHUNK_SPLIT_THRESHOLD, logger, READ_CHUNK_EXECUTOR, storeBackend, subscription
-
Constructor Summary
ConstructorsConstructorDescriptionVersionSpecificAvroGenericDaVinciClient
(DaVinciConfig daVinciConfig, ClientConfig clientConfig, VeniceProperties backendConfig, Optional<Set<String>> managedClients, int storeVersion) -
Method Summary
Modifier and TypeMethodDescriptionprotected CompletableFuture<Void>
subscribe
(ComplementSet<Integer> partitions) Methods inherited from class com.linkedin.davinci.client.AvroGenericDaVinciClient
addPartitionsToSubscription, batchGet, close, compute, compute, computeWithKeyPrefixFilter, discoverService, get, get, getAvroChunkingAdapter, getBackend, getGenericRecordChunkingAdapter, getKeySchema, getLatestValueSchema, getPartitionCount, getSchemaReader, getStoreName, getStoreVersion, initBackend, isPartitionReadyToServe, isPartitionSubscribed, isProjectionFieldValidationEnabled, isReady, split, start, streamingBatchGet, subscribe, subscribeAll, throwIfNotReady, toString, unsubscribe, unsubscribe, unsubscribeAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.linkedin.venice.client.store.AvroGenericReadComputeStoreClient
compute, compute, compute, computeAggregation
Methods inherited from interface com.linkedin.venice.client.store.AvroGenericStoreClient
streamingBatchGet
-
Constructor Details
-
VersionSpecificAvroGenericDaVinciClient
public VersionSpecificAvroGenericDaVinciClient(DaVinciConfig daVinciConfig, ClientConfig clientConfig, VeniceProperties backendConfig, Optional<Set<String>> managedClients, int storeVersion)
-
-
Method Details
-
subscribe
- Overrides:
subscribe
in classAvroGenericDaVinciClient<K,
V>
-