Search in sources :

Example 6 with JoinableFactory

use of org.apache.druid.segment.join.JoinableFactory in project druid by druid-io.

the class SqlModuleTest method makeInjectorWithProperties.

private Injector makeInjectorWithProperties(final Properties props) {
    return Guice.createInjector(ImmutableList.of(new DruidGuiceExtensions(), new LifecycleModule(), new ServerModule(), new JacksonModule(), (Module) binder -> {
        binder.bind(Validator.class).toInstance(Validation.buildDefaultValidatorFactory().getValidator());
        binder.bind(JsonConfigurator.class).in(LazySingleton.class);
        binder.bind(Properties.class).toInstance(props);
        binder.bind(ExprMacroTable.class).toInstance(ExprMacroTable.nil());
        binder.bind(AuthorizerMapper.class).toInstance(CalciteTests.TEST_AUTHORIZER_MAPPER);
        binder.bind(Escalator.class).toInstance(new NoopEscalator());
        binder.bind(ServiceEmitter.class).toInstance(serviceEmitter);
        binder.bind(RequestLogger.class).toInstance(new NoopRequestLogger());
        binder.bind(new TypeLiteral<Supplier<DefaultQueryConfig>>() {
        }).toInstance(Suppliers.ofInstance(new DefaultQueryConfig(null)));
        binder.bind(FilteredServerInventoryView.class).toInstance(inventoryView);
        binder.bind(TimelineServerView.class).toInstance(timelineServerView);
        binder.bind(DruidLeaderClient.class).annotatedWith(Coordinator.class).toInstance(druidLeaderClient);
        binder.bind(DruidLeaderClient.class).annotatedWith(IndexingService.class).toInstance(druidLeaderClient);
        binder.bind(DruidNodeDiscoveryProvider.class).toInstance(druidNodeDiscoveryProvider);
        binder.bind(GenericQueryMetricsFactory.class).toInstance(genericQueryMetricsFactory);
        binder.bind(QuerySegmentWalker.class).toInstance(querySegmentWalker);
        binder.bind(QueryToolChestWarehouse.class).toInstance(queryToolChestWarehouse);
        binder.bind(LookupExtractorFactoryContainerProvider.class).toInstance(lookupExtractorFactoryContainerProvider);
        binder.bind(JoinableFactory.class).toInstance(joinableFactory);
        binder.bind(SegmentLoader.class).toInstance(segmentLoader);
        binder.bind(QuerySchedulerProvider.class).in(LazySingleton.class);
        binder.bind(QueryScheduler.class).toProvider(QuerySchedulerProvider.class).in(LazySingleton.class);
    }, new SqlModule(props), new TestViewManagerModule()));
}
Also used : ServiceEmitter(org.apache.druid.java.util.emitter.service.ServiceEmitter) DruidGuiceExtensions(org.apache.druid.guice.DruidGuiceExtensions) Properties(java.util.Properties) ExprMacroTable(org.apache.druid.math.expr.ExprMacroTable) JoinableFactory(org.apache.druid.segment.join.JoinableFactory) ServerModule(org.apache.druid.guice.ServerModule) QuerySegmentWalker(org.apache.druid.query.QuerySegmentWalker) NoopEscalator(org.apache.druid.server.security.NoopEscalator) Escalator(org.apache.druid.server.security.Escalator) NoopEscalator(org.apache.druid.server.security.NoopEscalator) TypeLiteral(com.google.inject.TypeLiteral) QuerySchedulerProvider(org.apache.druid.server.QuerySchedulerProvider) IndexingService(org.apache.druid.client.indexing.IndexingService) RequestLogger(org.apache.druid.server.log.RequestLogger) NoopRequestLogger(org.apache.druid.server.log.NoopRequestLogger) JsonConfigurator(org.apache.druid.guice.JsonConfigurator) LookupExtractorFactoryContainerProvider(org.apache.druid.query.lookup.LookupExtractorFactoryContainerProvider) AuthorizerMapper(org.apache.druid.server.security.AuthorizerMapper) DefaultQueryConfig(org.apache.druid.query.DefaultQueryConfig) TimelineServerView(org.apache.druid.client.TimelineServerView) QueryToolChestWarehouse(org.apache.druid.query.QueryToolChestWarehouse) LifecycleModule(org.apache.druid.guice.LifecycleModule) FilteredServerInventoryView(org.apache.druid.client.FilteredServerInventoryView) NoopRequestLogger(org.apache.druid.server.log.NoopRequestLogger) GenericQueryMetricsFactory(org.apache.druid.query.GenericQueryMetricsFactory) Coordinator(org.apache.druid.client.coordinator.Coordinator) JacksonModule(org.apache.druid.jackson.JacksonModule) SegmentLoader(org.apache.druid.segment.loading.SegmentLoader) DruidNodeDiscoveryProvider(org.apache.druid.discovery.DruidNodeDiscoveryProvider) Module(com.google.inject.Module) LifecycleModule(org.apache.druid.guice.LifecycleModule) JacksonModule(org.apache.druid.jackson.JacksonModule) DruidModule(org.apache.druid.initialization.DruidModule) ServerModule(org.apache.druid.guice.ServerModule) Validator(javax.validation.Validator)

Aggregations

JoinableFactory (org.apache.druid.segment.join.JoinableFactory)6 Optional (java.util.Optional)3 DataSource (org.apache.druid.query.DataSource)3 ImmutableMap (com.google.common.collect.ImmutableMap)2 ImmutableSet (com.google.common.collect.ImmutableSet)2 ArrayList (java.util.ArrayList)2 List (java.util.List)2 ExprMacroTable (org.apache.druid.math.expr.ExprMacroTable)2 GlobalTableDataSource (org.apache.druid.query.GlobalTableDataSource)2 InlineDataSource (org.apache.druid.query.InlineDataSource)2 InlineJoinableFactory (org.apache.druid.segment.join.InlineJoinableFactory)2 Joinable (org.apache.druid.segment.join.Joinable)2 LookupJoinableFactory (org.apache.druid.segment.join.LookupJoinableFactory)2 MapJoinableFactory (org.apache.druid.segment.join.MapJoinableFactory)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 ImmutableList (com.google.common.collect.ImmutableList)1 Module (com.google.inject.Module)1 TypeLiteral (com.google.inject.TypeLiteral)1 IOException (java.io.IOException)1 Arrays (java.util.Arrays)1