Search in sources :

Example 26 with MetadataStorageConnectorConfig

use of org.apache.druid.metadata.MetadataStorageConnectorConfig in project druid by druid-io.

the class CliInternalHadoopIndexer method getModules.

@Override
protected List<? extends Module> getModules() {
    return ImmutableList.of(binder -> {
        binder.bindConstant().annotatedWith(Names.named("serviceName")).to("druid/internal-hadoop-indexer");
        binder.bindConstant().annotatedWith(Names.named("servicePort")).to(0);
        binder.bindConstant().annotatedWith(Names.named("tlsServicePort")).to(-1);
        // bind metadata storage config based on HadoopIOConfig
        MetadataStorageUpdaterJobSpec metadataSpec = getHadoopDruidIndexerConfig().getSchema().getIOConfig().getMetadataUpdateSpec();
        binder.bind(new TypeLiteral<Supplier<MetadataStorageConnectorConfig>>() {
        }).toInstance(metadataSpec);
        binder.bind(MetadataStorageTablesConfig.class).toInstance(metadataSpec.getMetadataStorageTablesConfig());
        binder.bind(IndexerMetadataStorageCoordinator.class).to(IndexerSQLMetadataStorageCoordinator.class).in(LazySingleton.class);
    });
}
Also used : IndexerSQLMetadataStorageCoordinator(org.apache.druid.metadata.IndexerSQLMetadataStorageCoordinator) MetadataStorageTablesConfig(org.apache.druid.metadata.MetadataStorageTablesConfig) MetadataStorageConnectorConfig(org.apache.druid.metadata.MetadataStorageConnectorConfig) TypeLiteral(com.google.inject.TypeLiteral) MetadataStorageUpdaterJobSpec(org.apache.druid.indexer.updater.MetadataStorageUpdaterJobSpec)

Aggregations

MetadataStorageConnectorConfig (org.apache.druid.metadata.MetadataStorageConnectorConfig)26 Test (org.junit.Test)21 JdbcAccessSecurityConfig (org.apache.druid.server.initialization.JdbcAccessSecurityConfig)17 MetadataStorageTablesConfig (org.apache.druid.metadata.MetadataStorageTablesConfig)3 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 DruidProcessingModule (org.apache.druid.guice.DruidProcessingModule)2 QueryRunnerFactoryModule (org.apache.druid.guice.QueryRunnerFactoryModule)2 QueryableModule (org.apache.druid.guice.QueryableModule)2 Self (org.apache.druid.guice.annotations.Self)2 MetadataStorageUpdaterJobSpec (org.apache.druid.indexer.updater.MetadataStorageUpdaterJobSpec)2 IndexerSQLMetadataStorageCoordinator (org.apache.druid.metadata.IndexerSQLMetadataStorageCoordinator)2 DruidNode (org.apache.druid.server.DruidNode)2 InjectableValues (com.fasterxml.jackson.databind.InjectableValues)1 TypeLiteral (com.google.inject.TypeLiteral)1 TestUtils (org.apache.druid.indexing.common.TestUtils)1 TaskStorageConfig (org.apache.druid.indexing.common.config.TaskStorageConfig)1 HeapMemoryTaskStorage (org.apache.druid.indexing.overlord.HeapMemoryTaskStorage)1 TaskLockbox (org.apache.druid.indexing.overlord.TaskLockbox)1 DefaultObjectMapper (org.apache.druid.jackson.DefaultObjectMapper)1 SegmentsMetadataManagerConfig (org.apache.druid.metadata.SegmentsMetadataManagerConfig)1