Package com.linkedin.venice.server
Class VeniceServer
java.lang.Object
com.linkedin.venice.server.VeniceServer
Class that represents the Venice server. It is responsible for maintaining
the lifecycle of multiple internal services including e.g. service start/stop
operations and making sure that it is done in the right order based on their
dependencies.
-
Constructor Summary
ConstructorDescriptionVeniceServer
(VeniceConfigLoader veniceConfigLoader, io.tehuti.metrics.MetricsRepository metricsRepository, Optional<SSLFactory> sslFactory, Optional<StaticAccessController> routerAccessController, Optional<DynamicAccessController> storeAccessController, Optional<ClientConfig> clientConfigForConsumer, ICProvider icProvider, List<ServiceDiscoveryAnnouncer> serviceDiscoveryAnnouncers) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected ListenerService
createListenerService
(StorageEngineRepository storageEngineRepository, ReadOnlyStoreRepository storeMetadataRepository, ReadOnlySchemaRepository schemaRepository, CompletableFuture<HelixCustomizedViewOfflinePushRepository> customizedViewRepository, IngestionMetadataRetriever ingestionMetadataRetriever, ReadMetadataRetriever readMetadataRetriever, VeniceServerConfig serverConfig, io.tehuti.metrics.MetricsRepository metricsRepository, Optional<SSLFactory> sslFactory, Optional<StaticAccessController> routerAccessController, Optional<DynamicAccessController> storeAccessController, DiskHealthCheckService diskHealthService, StorageEngineBackedCompressorFactory compressorFactory, Optional<ResourceReadUsageTracker> resourceReadUsageTracker) protected VeniceConfigLoader
io.tehuti.metrics.MetricsRepository
protected static boolean
isServerInAllowList
(String zkAddress, String clusterName, String hostname, int listenPort, boolean enableServerAllowlist) boolean
static void
static void
run
(VeniceConfigLoader veniceConfigService, boolean joinThread) static void
void
shutdown()
Method which closes VeniceServer, shuts down its resources, and exits the JVM.void
start()
Method which starts the services instantiate earlier.
-
Constructor Details
-
VeniceServer
@Deprecated public VeniceServer(VeniceConfigLoader veniceConfigLoader, io.tehuti.metrics.MetricsRepository metricsRepository, Optional<SSLFactory> sslFactory, Optional<StaticAccessController> routerAccessController, Optional<DynamicAccessController> storeAccessController, Optional<ClientConfig> clientConfigForConsumer, ICProvider icProvider, List<ServiceDiscoveryAnnouncer> serviceDiscoveryAnnouncers) Deprecated.UseVeniceServer(VeniceServerContext)
instead. Constructor kept for maintaining the backward compatibility Allocates a newVeniceServer
object.- Parameters:
veniceConfigLoader
- a config loader to load configs related to cluster and server.metricsRepository
- a registry for reporting metrics.sslFactory
- ssl certificate for enabling HTTP2.routerAccessController
- validates the accesses/requests from routers.storeAccessController
- validates the accesses/requests from clients.clientConfigForConsumer
- kafka client configurations.icProvider
- Provide IC(invocation-context) to remote calls inside services.serviceDiscoveryAnnouncers
- list of server discovery announcers- See Also:
-
VeniceServer
- Throws:
VeniceException
-
-
Method Details
-
getStorageService
-
getStorageMetadataService
-
getKafkaStoreIngestionService
-
getHelixParticipationService
-
getHeartbeatMonitoringService
-
isStarted
public boolean isStarted()- Returns:
- true if the
VeniceServer
and all of its inner services are fully started false if theVeniceServer
was not started or if any of its inner services are not finished starting.
-
start
Method which starts the services instantiate earlier.- Throws:
Exception
VeniceException
-
shutdown
Method which closes VeniceServer, shuts down its resources, and exits the JVM.- Throws:
VeniceException
-
isServerInAllowList
-
getConfigLoader
-
getMetricsRepository
public io.tehuti.metrics.MetricsRepository getMetricsRepository() -
createListenerService
protected ListenerService createListenerService(StorageEngineRepository storageEngineRepository, ReadOnlyStoreRepository storeMetadataRepository, ReadOnlySchemaRepository schemaRepository, CompletableFuture<HelixCustomizedViewOfflinePushRepository> customizedViewRepository, IngestionMetadataRetriever ingestionMetadataRetriever, ReadMetadataRetriever readMetadataRetriever, VeniceServerConfig serverConfig, io.tehuti.metrics.MetricsRepository metricsRepository, Optional<SSLFactory> sslFactory, Optional<StaticAccessController> routerAccessController, Optional<DynamicAccessController> storeAccessController, DiskHealthCheckService diskHealthService, StorageEngineBackedCompressorFactory compressorFactory, Optional<ResourceReadUsageTracker> resourceReadUsageTracker) -
main
- Throws:
Exception
-
run
- Throws:
Exception
-
run
- Throws:
Exception
-
VeniceServer(VeniceServerContext)
instead.