Search in sources :

Example 6 with TimeoutServiceConfig

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();
}
Also used : TimeoutServiceConfig(io.pravega.controller.timeout.TimeoutServiceConfig) HostMonitorConfig(io.pravega.controller.store.host.HostMonitorConfig)

Example 7 with TimeoutServiceConfig

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();
}
Also used : TimeoutServiceConfig(io.pravega.controller.timeout.TimeoutServiceConfig) HostMonitorConfig(io.pravega.controller.store.host.HostMonitorConfig)

Aggregations

HostMonitorConfig (io.pravega.controller.store.host.HostMonitorConfig)7 TimeoutServiceConfig (io.pravega.controller.timeout.TimeoutServiceConfig)7 StoreClientConfig (io.pravega.controller.store.client.StoreClientConfig)3 ControllerEventProcessorConfig (io.pravega.controller.server.eventProcessor.ControllerEventProcessorConfig)2 GRPCServerConfig (io.pravega.controller.server.rpc.grpc.GRPCServerConfig)2 ZKClientConfig (io.pravega.controller.store.client.ZKClientConfig)2 RESTServerConfig (io.pravega.shared.rest.RESTServerConfig)2 Preconditions (com.google.common.base.Preconditions)1 Strings (com.google.common.base.Strings)1 Callbacks (io.pravega.common.function.Callbacks)1 TLSProtocolVersion (io.pravega.common.security.TLSProtocolVersion)1 ZKTLSUtils (io.pravega.common.security.ZKTLSUtils)1 ControllerServiceConfig (io.pravega.controller.server.ControllerServiceConfig)1 ControllerServiceMain (io.pravega.controller.server.ControllerServiceMain)1 ControllerEventProcessorConfigImpl (io.pravega.controller.server.eventProcessor.impl.ControllerEventProcessorConfigImpl)1 ControllerServiceConfigImpl (io.pravega.controller.server.impl.ControllerServiceConfigImpl)1 GRPCServerConfigImpl (io.pravega.controller.server.rpc.grpc.impl.GRPCServerConfigImpl)1 StoreClientConfigImpl (io.pravega.controller.store.client.impl.StoreClientConfigImpl)1 ZKClientConfigImpl (io.pravega.controller.store.client.impl.ZKClientConfigImpl)1 HostMonitorConfigImpl (io.pravega.controller.store.host.impl.HostMonitorConfigImpl)1