use of io.pravega.controller.timeout.TimeoutServiceConfig in project pravega by pravega.
the class ControllerServiceStarterTest method createControllerServiceConfig.
protected ControllerServiceConfig createControllerServiceConfig() {
HostMonitorConfig hostMonitorConfig = HostMonitorConfigImpl.builder().hostMonitorEnabled(false).hostMonitorMinRebalanceInterval(Config.CLUSTER_MIN_REBALANCE_INTERVAL).containerCount(Config.HOST_STORE_CONTAINER_COUNT).hostContainerMap(HostMonitorConfigImpl.getHostContainerMap(Config.SERVICE_HOST, Config.SERVICE_PORT, Config.HOST_STORE_CONTAINER_COUNT)).build();
TimeoutServiceConfig timeoutServiceConfig = TimeoutServiceConfig.builder().maxLeaseValue(Config.MAX_LEASE_VALUE).build();
return ControllerServiceConfigImpl.builder().threadPoolSize(15).storeClientConfig(storeClientConfig).controllerClusterListenerEnabled(!disableControllerCluster).hostMonitorConfig(hostMonitorConfig).timeoutServiceConfig(timeoutServiceConfig).eventProcessorConfig(Optional.empty()).grpcServerConfig(Optional.of(GRPCServerConfigImpl.builder().port(grpcPort).authorizationEnabled(enableAuth).tlsEnabled(enableAuth).tlsProtocolVersion(SecurityConfigDefaults.TLS_PROTOCOL_VERSION).tlsCertFile(SecurityConfigDefaults.TLS_SERVER_CERT_PATH).tlsKeyFile(SecurityConfigDefaults.TLS_SERVER_PRIVATE_KEY_PATH).userPasswordFile(SecurityConfigDefaults.AUTH_HANDLER_INPUT_PATH).build())).restServerConfig(Optional.of(RESTServerConfigImpl.builder().port(restPort).host("localhost").authorizationEnabled(enableAuth).userPasswordFile(SecurityConfigDefaults.AUTH_HANDLER_INPUT_PATH).build())).build();
}
use of io.pravega.controller.timeout.TimeoutServiceConfig in project pravega by pravega.
the class ZKBackedControllerServiceStarterTest method createControllerServiceConfigWithEventProcessors.
protected ControllerServiceConfig createControllerServiceConfigWithEventProcessors() {
HostMonitorConfig hostMonitorConfig = HostMonitorConfigImpl.builder().hostMonitorEnabled(false).hostMonitorMinRebalanceInterval(Config.CLUSTER_MIN_REBALANCE_INTERVAL).containerCount(Config.HOST_STORE_CONTAINER_COUNT).hostContainerMap(HostMonitorConfigImpl.getHostContainerMap(Config.SERVICE_HOST, Config.SERVICE_PORT, Config.HOST_STORE_CONTAINER_COUNT)).build();
TimeoutServiceConfig timeoutServiceConfig = TimeoutServiceConfig.builder().maxLeaseValue(Config.MAX_LEASE_VALUE).build();
return ControllerServiceConfigImpl.builder().threadPoolSize(15).storeClientConfig(storeClientConfig).controllerClusterListenerEnabled(false).hostMonitorConfig(hostMonitorConfig).timeoutServiceConfig(timeoutServiceConfig).eventProcessorConfig(Optional.of(ControllerEventProcessorConfigImpl.withDefault())).grpcServerConfig(Optional.of(GRPCServerConfigImpl.builder().port(grpcPort).authorizationEnabled(false).tlsEnabled(false).tlsProtocolVersion(SecurityConfigDefaults.TLS_PROTOCOL_VERSION).build())).restServerConfig(Optional.empty()).build();
}
Aggregations