Package com.linkedin.venice.router
Class RouterServer
java.lang.Object
com.linkedin.venice.service.AbstractVeniceService
com.linkedin.venice.router.RouterServer
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from class com.linkedin.venice.service.AbstractVeniceService
AbstractVeniceService.ServiceState
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final Collection<MetricEntity>
static final String
static final String
Fields inherited from class com.linkedin.venice.service.AbstractVeniceService
logger, serviceState
-
Constructor Summary
ConstructorDescriptionRouterServer
(VeniceProperties properties, HelixCustomizedViewOfflinePushRepository routingDataRepository, Optional<HelixHybridStoreQuotaRepository> hybridStoreQuotaRepository, HelixReadOnlyStoreRepository metadataRepository, HelixReadOnlySchemaRepository schemaRepository, HelixReadOnlyStoreConfigRepository storeConfigRepository, List<ServiceDiscoveryAnnouncer> serviceDiscoveryAnnouncers, Optional<SSLFactory> sslFactory, HelixLiveInstanceMonitor liveInstanceMonitor) Only use this constructor for testing when you want to pass mock repositories Having separate constructors just for tests is hard to maintain, especially since in this case, the test constructor does not initialize manager...RouterServer
(VeniceProperties properties, List<ServiceDiscoveryAnnouncer> serviceDiscoveryAnnouncers, Optional<DynamicAccessController> accessController, Optional<SSLFactory> sslFactory) RouterServer
(VeniceProperties properties, List<ServiceDiscoveryAnnouncer> serviceDiscoveryAnnouncers, Optional<DynamicAccessController> accessController, Optional<SSLFactory> sslFactory, io.tehuti.metrics.MetricsRepository metricsRepository) RouterServer
(VeniceProperties properties, List<ServiceDiscoveryAnnouncer> serviceDiscoveryAnnouncers, Optional<DynamicAccessController> accessController, Optional<SSLFactory> sslFactory, io.tehuti.metrics.MetricsRepository metricsRepository, com.linkedin.d2.balancer.D2Client d2Client, String d2ServiceName) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addOptionalChannelHandler
(String key, io.netty.channel.ChannelHandler channelHandler) io.tehuti.metrics.MetricsRepository
static void
void
refresh()
static void
void
setReadRequestThrottling
(boolean throttle) boolean
void
-
Field Details
-
DEFAULT_CLUSTER_DISCOVERY_D2_SERVICE_NAME
- See Also:
-
ROUTER_SERVICE_NAME
- See Also:
-
ROUTER_SERVICE_METRIC_PREFIX
- See Also:
-
ROUTER_SERVICE_METRIC_ENTITIES
-
-
Constructor Details
-
RouterServer
public RouterServer(VeniceProperties properties, List<ServiceDiscoveryAnnouncer> serviceDiscoveryAnnouncers, Optional<DynamicAccessController> accessController, Optional<SSLFactory> sslFactory) -
RouterServer
public RouterServer(VeniceProperties properties, List<ServiceDiscoveryAnnouncer> serviceDiscoveryAnnouncers, Optional<DynamicAccessController> accessController, Optional<SSLFactory> sslFactory, io.tehuti.metrics.MetricsRepository metricsRepository) -
RouterServer
public RouterServer(VeniceProperties properties, List<ServiceDiscoveryAnnouncer> serviceDiscoveryAnnouncers, Optional<DynamicAccessController> accessController, Optional<SSLFactory> sslFactory, io.tehuti.metrics.MetricsRepository metricsRepository, com.linkedin.d2.balancer.D2Client d2Client, String d2ServiceName) -
RouterServer
public RouterServer(VeniceProperties properties, HelixCustomizedViewOfflinePushRepository routingDataRepository, Optional<HelixHybridStoreQuotaRepository> hybridStoreQuotaRepository, HelixReadOnlyStoreRepository metadataRepository, HelixReadOnlySchemaRepository schemaRepository, HelixReadOnlyStoreConfigRepository storeConfigRepository, List<ServiceDiscoveryAnnouncer> serviceDiscoveryAnnouncers, Optional<SSLFactory> sslFactory, HelixLiveInstanceMonitor liveInstanceMonitor) Only use this constructor for testing when you want to pass mock repositories Having separate constructors just for tests is hard to maintain, especially since in this case, the test constructor does not initialize manager...
-
-
Method Details
-
main
- Throws:
Exception
-
run
- Throws:
Exception
-
getMetricsRepository
public io.tehuti.metrics.MetricsRepository getMetricsRepository() -
startInner
- Specified by:
startInner
in classAbstractVeniceService
- Returns:
- true if the service is completely started,
false if it is still starting asynchronously (in this case, it is the implementer's
responsibility to set
AbstractVeniceService.serviceState
toAbstractVeniceService.ServiceState.STARTED
upon completion of the async work). - Throws:
Exception
-
addOptionalChannelHandler
-
stopInner
- Specified by:
stopInner
in classAbstractVeniceService
- Throws:
Exception
-
getRoutingDataRepository
-
getMetadataRepository
-
getSchemaRepository
-
getRoutersClusterManager
-
getConfig
-
setReadRequestThrottling
public void setReadRequestThrottling(boolean throttle) -
refresh
public void refresh()
-