Search in sources :

Example 16 with BrokerInternalQueryConfig

use of org.apache.druid.client.BrokerInternalQueryConfig 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

BrokerInternalQueryConfig (org.apache.druid.client.BrokerInternalQueryConfig)16 MapJoinableFactory (org.apache.druid.segment.join.MapJoinableFactory)15 NoopEscalator (org.apache.druid.server.security.NoopEscalator)15 DataSegment (org.apache.druid.timeline.DataSegment)13 Test (org.junit.Test)13 CountDownLatch (java.util.concurrent.CountDownLatch)11 DruidServerMetadata (org.apache.druid.server.coordination.DruidServerMetadata)11 DruidTable (org.apache.druid.sql.calcite.table.DruidTable)10 SpecificSegmentsQuerySegmentWalker (org.apache.druid.sql.calcite.util.SpecificSegmentsQuerySegmentWalker)10 TestServerInventoryView (org.apache.druid.sql.calcite.util.TestServerInventoryView)10 SegmentId (org.apache.druid.timeline.SegmentId)10 ImmutableSet (com.google.common.collect.ImmutableSet)9 File (java.io.File)9 Set (java.util.Set)9 GlobalTableDataSource (org.apache.druid.query.GlobalTableDataSource)9 TableDataSource (org.apache.druid.query.TableDataSource)9 CountAggregatorFactory (org.apache.druid.query.aggregation.CountAggregatorFactory)9 DoubleSumAggregatorFactory (org.apache.druid.query.aggregation.DoubleSumAggregatorFactory)9 LongSumAggregatorFactory (org.apache.druid.query.aggregation.LongSumAggregatorFactory)9 HyperUniquesAggregatorFactory (org.apache.druid.query.aggregation.hyperloglog.HyperUniquesAggregatorFactory)9