Package com.linkedin.venice.client.store
Interface AvroGenericStoreClient<K,V>
- Type Parameters:
V
-
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Subinterfaces:
AvroGenericReadComputeStoreClient<K,
,V> AvroSpecificStoreClient<K,
,V> DaVinciClient<K,
V>
- All Known Implementing Classes:
AbstractAvroStoreClient
,AvroBlackHoleResponseStoreClientImpl
,AvroGenericDaVinciClient
,AvroGenericStoreClientImpl
,AvroSpecificDaVinciClient
,AvroSpecificStoreClientImpl
,DelegatingAvroGenericDaVinciClient
,DelegatingAvroStoreClient
,DelegatingStoreClient
,DispatchingAvroGenericStoreClient
,DispatchingAvroSpecificStoreClient
,DispatchingVsonStoreClient
,DualReadAvroGenericStoreClient
,DualReadAvroSpecificStoreClient
,InternalAvroStoreClient
,InternalAvroStoreClient
,RetriableAvroGenericStoreClient
,RetriableAvroSpecificStoreClient
,RetriableStoreClient
,SpecificRetriableStoreClient
,SpecificStatTrackingStoreClient
,StatsAvroGenericDaVinciClient
,StatsAvroGenericStoreClient
,StatsAvroSpecificDaVinciClient
,StatsAvroSpecificStoreClient
,StatTrackingStoreClient
,VsonGenericStoreClientImpl
Venice avro generic client to communicate with Venice backend for key-value lookup.
-
Method Summary
Modifier and TypeMethodDescriptiondefault CompletableFuture<Map<K,
V>> Get the values associated with the given keys and return them in a map of keys to values.void
close()
Release the internal resources.compute()
This API allows performing transformations (projection, vector arithmetic and aggregations like count) on the values associated with the given set of keys.Lookup the value by given key, and get(key).get() will return null if it doesn't exist.default CompletableFuture<V>
Similar toget(Object)
except that it allows passing in a instance, to minimize GC.org.apache.avro.Schema
Deprecated.This method is considered deprecated.org.apache.avro.Schema
Deprecated.This method is considered deprecated.void
start()
default CompletableFuture<VeniceResponseMap<K,
V>> streamingBatchGet
(Set<K> keys) Get the values associated with the given keys and return them in a map of keys to values.void
streamingBatchGet
(Set<K> keys, StreamingCallback<K, V> callback) Streaming interface forbatchGet(Set)
.
-
Method Details
-
get
Lookup the value by given key, and get(key).get() will return null if it doesn't exist. For now, if any backend error/exception happens, get(Object key).get() will throwExecutionException
, which is a wrapper of the real exception.- Parameters:
key
-- Returns:
- Throws:
VeniceClientException
-
get
Similar toget(Object)
except that it allows passing in a instance, to minimize GC.- Throws:
VeniceClientException
-
batchGet
Get the values associated with the given keys and return them in a map of keys to values. Note that the returned map will only contain entries for the keys which have a value associated with them.- Parameters:
keys
-- Returns:
- Throws:
VeniceClientException
-
streamingBatchGet
default CompletableFuture<VeniceResponseMap<K,V>> streamingBatchGet(Set<K> keys) throws VeniceClientException Get the values associated with the given keys and return them in a map of keys to values. When time-out happens for the following invocation:streamingBatchGet(keys).get(waitingTime, unit);
This function will return the available response instead of throwing aTimeoutException
. It means this function could return either full response or partial response.- Parameters:
keys
-- Returns:
- Throws:
VeniceClientException
-
streamingBatchGet
Streaming interface forbatchGet(Set)
. You can find more info inStreamingCallback
.- Parameters:
keys
-callback
-- Throws:
VeniceClientException
-
compute
ComputeRequestBuilder<K> compute()This API allows performing transformations (projection, vector arithmetic and aggregations like count) on the values associated with the given set of keys. Check outComputeRequestBuilder
for details on the available operations.- See Also:
-
start
- Throws:
VeniceClientException
-
close
void close()Release the internal resources.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getStoreName
String getStoreName() -
getKeySchema
Deprecated.This method is considered deprecated. Please useStoreSchemaFetcher.getKeySchema()
to fetch key schema instead.Get key schema. -
getLatestValueSchema
Deprecated.This method is considered deprecated. Please useStoreSchemaFetcher.getLatestValueSchemaEntry()
to fetch latest value schema instead.Get the latest value schema known in current store client. This function doesn't guarantee it will return the latest schema if you add a new value schema when current store client is running.
-