Search in sources :

Example 1 with IndexingServiceDiscoveryModule

use of io.druid.guice.IndexingServiceDiscoveryModule in project druid by druid-io.

the class Initialization method makeInjectorWithModules.

public static Injector makeInjectorWithModules(final Injector baseInjector, Iterable<? extends Module> modules) {
    final ModuleList defaultModules = new ModuleList(baseInjector);
    defaultModules.addModules(// New modules should be added after Log4jShutterDownerModule
    new Log4jShutterDownerModule(), new DruidAuthModule(), new LifecycleModule(), EmitterModule.class, HttpClientModule.global(), new HttpClientModule("druid.broker.http", Client.class), new CuratorModule(), new AnnouncerModule(), new DruidProcessingModule(), new AWSModule(), new MetricsModule(), new ServerModule(), new StorageNodeModule(), new JettyServerModule(), new QueryableModule(), new QueryRunnerFactoryModule(), new DiscoveryModule(), new ServerViewModule(), new MetadataConfigModule(), new DerbyMetadataStorageDruidModule(), new JacksonConfigManagerModule(), new IndexingServiceDiscoveryModule(), new CoordinatorDiscoveryModule(), new LocalDataStorageDruidModule(), new FirehoseModule(), new ParsersModule(), new JavaScriptModule(), new StartupLoggingModule());
    ModuleList actualModules = new ModuleList(baseInjector);
    actualModules.addModule(DruidSecondaryModule.class);
    for (Object module : modules) {
        actualModules.addModule(module);
    }
    Module intermediateModules = Modules.override(defaultModules.getModules()).with(actualModules.getModules());
    ModuleList extensionModules = new ModuleList(baseInjector);
    final ExtensionsConfig config = baseInjector.getInstance(ExtensionsConfig.class);
    for (DruidModule module : Initialization.getFromExtensions(config, DruidModule.class)) {
        extensionModules.addModule(module);
    }
    return Guice.createInjector(Modules.override(intermediateModules).with(extensionModules.getModules()));
}
Also used : CuratorModule(io.druid.curator.CuratorModule) DiscoveryModule(io.druid.curator.discovery.DiscoveryModule) CoordinatorDiscoveryModule(io.druid.guice.CoordinatorDiscoveryModule) IndexingServiceDiscoveryModule(io.druid.guice.IndexingServiceDiscoveryModule) ServerViewModule(io.druid.guice.ServerViewModule) JettyServerModule(io.druid.server.initialization.jetty.JettyServerModule) JettyServerModule(io.druid.server.initialization.jetty.JettyServerModule) ServerModule(io.druid.guice.ServerModule) FirehoseModule(io.druid.guice.FirehoseModule) AWSModule(io.druid.guice.AWSModule) ParsersModule(io.druid.guice.ParsersModule) LocalDataStorageDruidModule(io.druid.guice.LocalDataStorageDruidModule) DerbyMetadataStorageDruidModule(io.druid.metadata.storage.derby.DerbyMetadataStorageDruidModule) Client(io.druid.guice.annotations.Client) ExtensionsConfig(io.druid.guice.ExtensionsConfig) JacksonConfigManagerModule(io.druid.guice.JacksonConfigManagerModule) LifecycleModule(io.druid.guice.LifecycleModule) IndexingServiceDiscoveryModule(io.druid.guice.IndexingServiceDiscoveryModule) QueryRunnerFactoryModule(io.druid.guice.QueryRunnerFactoryModule) LocalDataStorageDruidModule(io.druid.guice.LocalDataStorageDruidModule) StartupLoggingModule(io.druid.guice.StartupLoggingModule) DerbyMetadataStorageDruidModule(io.druid.metadata.storage.derby.DerbyMetadataStorageDruidModule) QueryableModule(io.druid.guice.QueryableModule) MetadataConfigModule(io.druid.guice.MetadataConfigModule) CoordinatorDiscoveryModule(io.druid.guice.CoordinatorDiscoveryModule) DruidProcessingModule(io.druid.guice.DruidProcessingModule) DruidAuthModule(io.druid.guice.security.DruidAuthModule) MetricsModule(io.druid.server.metrics.MetricsModule) AnnouncerModule(io.druid.guice.AnnouncerModule) StorageNodeModule(io.druid.guice.StorageNodeModule) Module(com.google.inject.Module) ParsersModule(io.druid.guice.ParsersModule) QueryableModule(io.druid.guice.QueryableModule) DiscoveryModule(io.druid.curator.discovery.DiscoveryModule) LocalDataStorageDruidModule(io.druid.guice.LocalDataStorageDruidModule) AnnouncerModule(io.druid.guice.AnnouncerModule) AWSModule(io.druid.guice.AWSModule) CoordinatorDiscoveryModule(io.druid.guice.CoordinatorDiscoveryModule) MetricsModule(io.druid.server.metrics.MetricsModule) FirehoseModule(io.druid.guice.FirehoseModule) DruidAuthModule(io.druid.guice.security.DruidAuthModule) JavaScriptModule(io.druid.guice.JavaScriptModule) EmitterModule(io.druid.server.initialization.EmitterModule) LifecycleModule(io.druid.guice.LifecycleModule) ServerViewModule(io.druid.guice.ServerViewModule) JacksonConfigManagerModule(io.druid.guice.JacksonConfigManagerModule) MetadataConfigModule(io.druid.guice.MetadataConfigModule) CuratorModule(io.druid.curator.CuratorModule) IndexingServiceDiscoveryModule(io.druid.guice.IndexingServiceDiscoveryModule) StartupLoggingModule(io.druid.guice.StartupLoggingModule) DerbyMetadataStorageDruidModule(io.druid.metadata.storage.derby.DerbyMetadataStorageDruidModule) JettyServerModule(io.druid.server.initialization.jetty.JettyServerModule) StorageNodeModule(io.druid.guice.StorageNodeModule) ServerModule(io.druid.guice.ServerModule) HttpClientModule(io.druid.guice.http.HttpClientModule) DruidProcessingModule(io.druid.guice.DruidProcessingModule) QueryRunnerFactoryModule(io.druid.guice.QueryRunnerFactoryModule) DruidSecondaryModule(io.druid.guice.DruidSecondaryModule) HttpClientModule(io.druid.guice.http.HttpClientModule) JavaScriptModule(io.druid.guice.JavaScriptModule)

Aggregations

Module (com.google.inject.Module)1 CuratorModule (io.druid.curator.CuratorModule)1 DiscoveryModule (io.druid.curator.discovery.DiscoveryModule)1 AWSModule (io.druid.guice.AWSModule)1 AnnouncerModule (io.druid.guice.AnnouncerModule)1 CoordinatorDiscoveryModule (io.druid.guice.CoordinatorDiscoveryModule)1 DruidProcessingModule (io.druid.guice.DruidProcessingModule)1 DruidSecondaryModule (io.druid.guice.DruidSecondaryModule)1 ExtensionsConfig (io.druid.guice.ExtensionsConfig)1 FirehoseModule (io.druid.guice.FirehoseModule)1 IndexingServiceDiscoveryModule (io.druid.guice.IndexingServiceDiscoveryModule)1 JacksonConfigManagerModule (io.druid.guice.JacksonConfigManagerModule)1 JavaScriptModule (io.druid.guice.JavaScriptModule)1 LifecycleModule (io.druid.guice.LifecycleModule)1 LocalDataStorageDruidModule (io.druid.guice.LocalDataStorageDruidModule)1 MetadataConfigModule (io.druid.guice.MetadataConfigModule)1 ParsersModule (io.druid.guice.ParsersModule)1 QueryRunnerFactoryModule (io.druid.guice.QueryRunnerFactoryModule)1 QueryableModule (io.druid.guice.QueryableModule)1 ServerModule (io.druid.guice.ServerModule)1