Search in sources :

Example 1 with NoopInputSource

use of org.apache.druid.data.input.impl.NoopInputSource in project druid by druid-io.

the class IndexIngestionSpecTest method testFirehoseAndInputSource.

@Test
public void testFirehoseAndInputSource() {
    expectedException.expect(IllegalArgumentException.class);
    expectedException.expectMessage("At most one of [Property{name='firehose', value=NoopFirehoseFactory{}}, Property{name='inputSource'");
    final IndexIngestionSpec spec = new IndexIngestionSpec(new DataSchema("dataSource", new TimestampSpec(null, null, null), DimensionsSpec.EMPTY, new AggregatorFactory[0], new ArbitraryGranularitySpec(Granularities.NONE, null), null), new IndexIOConfig(new NoopFirehoseFactory(), new NoopInputSource(), null, null, null), null);
}
Also used : DataSchema(org.apache.druid.segment.indexing.DataSchema) IndexIngestionSpec(org.apache.druid.indexing.common.task.IndexTask.IndexIngestionSpec) IndexIOConfig(org.apache.druid.indexing.common.task.IndexTask.IndexIOConfig) NoopInputSource(org.apache.druid.data.input.impl.NoopInputSource) TimestampSpec(org.apache.druid.data.input.impl.TimestampSpec) NoopFirehoseFactory(org.apache.druid.data.input.impl.NoopFirehoseFactory) AggregatorFactory(org.apache.druid.query.aggregation.AggregatorFactory) ArbitraryGranularitySpec(org.apache.druid.segment.indexing.granularity.ArbitraryGranularitySpec) Test(org.junit.Test)

Example 2 with NoopInputSource

use of org.apache.druid.data.input.impl.NoopInputSource in project druid by druid-io.

the class IndexIngestionSpecTest method testParserAndInputFormat.

@Test
public void testParserAndInputFormat() {
    expectedException.expect(IllegalArgumentException.class);
    expectedException.expectMessage("Cannot use parser and inputSource together. Try using inputFormat instead of parser.");
    final IndexIngestionSpec spec = new IndexIngestionSpec(new DataSchema("dataSource", ImmutableMap.of("fake", "parser map"), new AggregatorFactory[0], new ArbitraryGranularitySpec(Granularities.NONE, null), null, null), new IndexIOConfig(null, new NoopInputSource(), new NoopInputFormat(), null, null), null);
}
Also used : DataSchema(org.apache.druid.segment.indexing.DataSchema) IndexIngestionSpec(org.apache.druid.indexing.common.task.IndexTask.IndexIngestionSpec) IndexIOConfig(org.apache.druid.indexing.common.task.IndexTask.IndexIOConfig) NoopInputSource(org.apache.druid.data.input.impl.NoopInputSource) NoopInputFormat(org.apache.druid.data.input.impl.NoopInputFormat) AggregatorFactory(org.apache.druid.query.aggregation.AggregatorFactory) ArbitraryGranularitySpec(org.apache.druid.segment.indexing.granularity.ArbitraryGranularitySpec) Test(org.junit.Test)

Example 3 with NoopInputSource

use of org.apache.druid.data.input.impl.NoopInputSource in project druid by druid-io.

the class IndexIngestionSpecTest method testParserAndInputSource.

@Test
public void testParserAndInputSource() {
    expectedException.expect(IllegalArgumentException.class);
    expectedException.expectMessage("Cannot use parser and inputSource together.");
    final IndexIngestionSpec spec = new IndexIngestionSpec(new DataSchema("dataSource", ImmutableMap.of("fake", "parser map"), new AggregatorFactory[0], new ArbitraryGranularitySpec(Granularities.NONE, null), null, null), new IndexIOConfig(null, new NoopInputSource(), null, null, null), null);
}
Also used : DataSchema(org.apache.druid.segment.indexing.DataSchema) IndexIngestionSpec(org.apache.druid.indexing.common.task.IndexTask.IndexIngestionSpec) IndexIOConfig(org.apache.druid.indexing.common.task.IndexTask.IndexIOConfig) NoopInputSource(org.apache.druid.data.input.impl.NoopInputSource) AggregatorFactory(org.apache.druid.query.aggregation.AggregatorFactory) ArbitraryGranularitySpec(org.apache.druid.segment.indexing.granularity.ArbitraryGranularitySpec) Test(org.junit.Test)

Aggregations

NoopInputSource (org.apache.druid.data.input.impl.NoopInputSource)3 IndexIOConfig (org.apache.druid.indexing.common.task.IndexTask.IndexIOConfig)3 IndexIngestionSpec (org.apache.druid.indexing.common.task.IndexTask.IndexIngestionSpec)3 AggregatorFactory (org.apache.druid.query.aggregation.AggregatorFactory)3 DataSchema (org.apache.druid.segment.indexing.DataSchema)3 ArbitraryGranularitySpec (org.apache.druid.segment.indexing.granularity.ArbitraryGranularitySpec)3 Test (org.junit.Test)3 NoopFirehoseFactory (org.apache.druid.data.input.impl.NoopFirehoseFactory)1 NoopInputFormat (org.apache.druid.data.input.impl.NoopInputFormat)1 TimestampSpec (org.apache.druid.data.input.impl.TimestampSpec)1