Package com.linkedin.davinci.client
Interface DaVinciClient<K,V>
- Type Parameters:
K
-V
-
- All Superinterfaces:
AutoCloseable
,AvroGenericStoreClient<K,
,V> Closeable
- All Known Implementing Classes:
AvroGenericDaVinciClient
,AvroSpecificDaVinciClient
,DelegatingAvroGenericDaVinciClient
,StatsAvroGenericDaVinciClient
,StatsAvroSpecificDaVinciClient
Da Vinci Client to provide key-value lookups in embedded mode
-
Method Summary
Modifier and TypeMethodDescriptionint
Get partition count of a store.Ingest specific partition/partitions locally.Ingest the entire data (i.e.void
unsubscribe
(Set<Integer> partitions) Stop ingesting a partition locally, and drop its associated local states/data.void
Stop ingesting all subscribed partition locally, and drop their associated local states/data.Methods inherited from interface com.linkedin.venice.client.store.AvroGenericStoreClient
batchGet, close, compute, get, get, getKeySchema, getLatestValueSchema, getStoreName, start, streamingBatchGet, streamingBatchGet
-
Method Details
-
subscribeAll
CompletableFuture<Void> subscribeAll()Ingest the entire data (i.e. all partitions) locally.- Returns:
- a future which completes when the data is ready to serve
- Throws:
a
- VeniceException if subscription failed for any of the partitions
-
subscribe
Ingest specific partition/partitions locally.- Parameters:
partitions
- the set of partition IDs to subscribe to- Returns:
- a future which completes when the partitions are ready to serve
- Throws:
a
- VeniceException if subscription failed for any of the partitions
-
unsubscribeAll
void unsubscribeAll()Stop ingesting all subscribed partition locally, and drop their associated local states/data. If applications intend to keep the states/data for future use, no need to invoke this function before callingAvroGenericStoreClient.close()
.- Throws:
a
- VeniceException if cleanup failed for any of the partitions
-
unsubscribe
Stop ingesting a partition locally, and drop its associated local states/data. If applications intend to keep the states/data for future use, no need to invoke this function before callingAvroGenericStoreClient.close()
.- Parameters:
partitions
- the set of partition IDs to unsubscribe from- Throws:
a
- VeniceException if cleanup failed for any of the partitions
-
getPartitionCount
int getPartitionCount()Get partition count of a store.- Returns:
- partition count
-