Package com.linkedin.venice.hooks
Class GrpcStoreLifecycleHooks
java.lang.Object
com.linkedin.venice.hooks.StoreLifecycleHooks
com.linkedin.venice.hooks.GrpcStoreLifecycleHooks
- All Implemented Interfaces:
Closeable,AutoCloseable
A hook implementation that calls a gRPC service for store lifecycle events.
Uses static caching to maintain state across multiple instances created through reflection.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()postStoreVersionSwap(String clusterName, String storeName, int versionNumber, String regionName, Lazy<JobStatusQueryResponse> jobStatus, VeniceProperties storeHooksConfigs) Invoked after swapping read traffic for servers.
Cardinality: once per store-version per region which has successfully swapped.Invoked prior to updating a store's config with a given list of params.Methods inherited from class com.linkedin.venice.hooks.StoreLifecycleHooks
getDefaultConfigs, postEndOfPushJob, postSchemaRegistration, postStartOfPushJob, postStartOfStoreVersionIngestionForDaVinci, postStoreVersionCreation, postStoreVersionLeaderReplication, preEndOfPushJob, preSchemaRegistration, preStartOfPushJob, preStartOfStoreVersionIngestionForDaVinci, preStoreVersionCreation, preStoreVersionSwap, validateHookConfig
-
Constructor Details
-
GrpcStoreLifecycleHooks
-
-
Method Details
-
validateHookParams
public StoreLifecycleEventOutcome validateHookParams(String clusterName, String storeName, Map<String, String> hookParams) Description copied from class:StoreLifecycleHooksInvoked prior to updating a store's config with a given list of params. If the hook implementation recognizes the params, then it will returnStoreLifecycleEventOutcome.PROCEED, otherwise it should return *StoreLifecycleEventOutcome.ABORTif any params are missing or invalid.- Overrides:
validateHookParamsin classStoreLifecycleHooks- Returns:
-
postStoreVersionSwap
public StoreVersionLifecycleEventOutcome postStoreVersionSwap(String clusterName, String storeName, int versionNumber, String regionName, Lazy<JobStatusQueryResponse> jobStatus, VeniceProperties storeHooksConfigs) Description copied from class:StoreLifecycleHooksInvoked after swapping read traffic for servers.
Cardinality: once per store-version per region which has successfully swapped.- Overrides:
postStoreVersionSwapin classStoreLifecycleHooks
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-