Search in sources :

Example 11 with QueryRunnerFactoryConglomerate

use of org.apache.druid.query.QueryRunnerFactoryConglomerate in project druid by druid-io.

the class DruidSchemaNoDataInitTest method testInitializationWithNoData.

@Test
public void testInitializationWithNoData() throws Exception {
    try (final Closer closer = Closer.create()) {
        final QueryRunnerFactoryConglomerate conglomerate = QueryStackTests.createQueryRunnerFactoryConglomerate(closer);
        final DruidSchema druidSchema = new DruidSchema(CalciteTests.createMockQueryLifecycleFactory(new SpecificSegmentsQuerySegmentWalker(conglomerate), conglomerate), new TestServerInventoryView(Collections.emptyList()), new SegmentManager(EasyMock.createMock(SegmentLoader.class)), new MapJoinableFactory(ImmutableSet.of(), ImmutableMap.of()), PLANNER_CONFIG_DEFAULT, new NoopEscalator(), new BrokerInternalQueryConfig(), null);
        druidSchema.start();
        druidSchema.awaitInitialization();
        Assert.assertEquals(ImmutableMap.of(), druidSchema.getTableMap());
    }
}
Also used : Closer(org.apache.druid.java.util.common.io.Closer) NoopEscalator(org.apache.druid.server.security.NoopEscalator) QueryRunnerFactoryConglomerate(org.apache.druid.query.QueryRunnerFactoryConglomerate) SpecificSegmentsQuerySegmentWalker(org.apache.druid.sql.calcite.util.SpecificSegmentsQuerySegmentWalker) SegmentManager(org.apache.druid.server.SegmentManager) TestServerInventoryView(org.apache.druid.sql.calcite.util.TestServerInventoryView) BrokerInternalQueryConfig(org.apache.druid.client.BrokerInternalQueryConfig) MapJoinableFactory(org.apache.druid.segment.join.MapJoinableFactory) Test(org.junit.Test)

Aggregations

QueryRunnerFactoryConglomerate (org.apache.druid.query.QueryRunnerFactoryConglomerate)11 Query (org.apache.druid.query.Query)4 SpecificSegmentsQuerySegmentWalker (org.apache.druid.sql.calcite.util.SpecificSegmentsQuerySegmentWalker)4 DataSegment (org.apache.druid.timeline.DataSegment)4 CacheConfig (org.apache.druid.client.cache.CacheConfig)3 CachePopulatorStats (org.apache.druid.client.cache.CachePopulatorStats)3 DefaultQueryRunnerFactoryConglomerate (org.apache.druid.query.DefaultQueryRunnerFactoryConglomerate)3 TimeseriesQueryEngine (org.apache.druid.query.timeseries.TimeseriesQueryEngine)3 TimeseriesQueryQueryToolChest (org.apache.druid.query.timeseries.TimeseriesQueryQueryToolChest)3 TimeseriesQueryRunnerFactory (org.apache.druid.query.timeseries.TimeseriesQueryRunnerFactory)3 QueryableIndex (org.apache.druid.segment.QueryableIndex)3 LinearShardSpec (org.apache.druid.timeline.partition.LinearShardSpec)3 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)2 CountDownLatch (java.util.concurrent.CountDownLatch)2 DefaultObjectMapper (org.apache.druid.jackson.DefaultObjectMapper)2 MonitorScheduler (org.apache.druid.java.util.metrics.MonitorScheduler)2 QueryRunnerFactory (org.apache.druid.query.QueryRunnerFactory)2 CountAggregatorFactory (org.apache.druid.query.aggregation.CountAggregatorFactory)2 GeneratorSchemaInfo (org.apache.druid.segment.generator.GeneratorSchemaInfo)2 SegmentGenerator (org.apache.druid.segment.generator.SegmentGenerator)2