Search in sources :

Example 1 with ServiceStreamConfigProvider

use of com.twitter.distributedlog.service.config.ServiceStreamConfigProvider in project distributedlog by twitter.

the class DistributedLogServer method getStreamConfigProvider.

private StreamConfigProvider getStreamConfigProvider(DistributedLogConfiguration dlConf, StreamPartitionConverter partitionConverter) throws ConfigurationException {
    StreamConfigProvider streamConfProvider = new NullStreamConfigProvider();
    if (streamConf.isPresent() && conf.isPresent()) {
        String dynConfigPath = streamConf.get();
        String defaultConfigFile = conf.get();
        streamConfProvider = new ServiceStreamConfigProvider(dynConfigPath, defaultConfigFile, partitionConverter, configExecutorService, dlConf.getDynamicConfigReloadIntervalSec(), TimeUnit.SECONDS);
    } else if (conf.isPresent()) {
        String configFile = conf.get();
        streamConfProvider = new DefaultStreamConfigProvider(configFile, configExecutorService, dlConf.getDynamicConfigReloadIntervalSec(), TimeUnit.SECONDS);
    }
    return streamConfProvider;
}
Also used : DefaultStreamConfigProvider(com.twitter.distributedlog.service.config.DefaultStreamConfigProvider) DefaultStreamConfigProvider(com.twitter.distributedlog.service.config.DefaultStreamConfigProvider) ServiceStreamConfigProvider(com.twitter.distributedlog.service.config.ServiceStreamConfigProvider) NullStreamConfigProvider(com.twitter.distributedlog.service.config.NullStreamConfigProvider) StreamConfigProvider(com.twitter.distributedlog.service.config.StreamConfigProvider) NullStreamConfigProvider(com.twitter.distributedlog.service.config.NullStreamConfigProvider) ServiceStreamConfigProvider(com.twitter.distributedlog.service.config.ServiceStreamConfigProvider)

Aggregations

DefaultStreamConfigProvider (com.twitter.distributedlog.service.config.DefaultStreamConfigProvider)1 NullStreamConfigProvider (com.twitter.distributedlog.service.config.NullStreamConfigProvider)1 ServiceStreamConfigProvider (com.twitter.distributedlog.service.config.ServiceStreamConfigProvider)1 StreamConfigProvider (com.twitter.distributedlog.service.config.StreamConfigProvider)1