Search in sources :

Example 1 with StaticPathSpec

use of io.druid.indexer.path.StaticPathSpec in project druid by druid-io.

the class HadoopIngestionSpecUpdateDatasourcePathSpecSegmentsTest method testupdateSegmentListIfDatasourcePathSpecIsUsedWithNoDatasourcePathSpec.

@Test
public void testupdateSegmentListIfDatasourcePathSpecIsUsedWithNoDatasourcePathSpec() throws Exception {
    PathSpec pathSpec = new StaticPathSpec("/xyz", null);
    HadoopDruidIndexerConfig config = testRunUpdateSegmentListIfDatasourcePathSpecIsUsed(pathSpec, null);
    Assert.assertTrue(config.getPathSpec() instanceof StaticPathSpec);
}
Also used : StaticPathSpec(io.druid.indexer.path.StaticPathSpec) DatasourcePathSpec(io.druid.indexer.path.DatasourcePathSpec) StaticPathSpec(io.druid.indexer.path.StaticPathSpec) PathSpec(io.druid.indexer.path.PathSpec) MultiplePathSpec(io.druid.indexer.path.MultiplePathSpec) Test(org.junit.Test)

Example 2 with StaticPathSpec

use of io.druid.indexer.path.StaticPathSpec in project druid by druid-io.

the class HadoopIngestionSpecUpdateDatasourcePathSpecSegmentsTest method testupdateSegmentListIfDatasourcePathSpecIsUsedWithMultiplePathSpec.

@Test
public void testupdateSegmentListIfDatasourcePathSpecIsUsedWithMultiplePathSpec() throws Exception {
    PathSpec pathSpec = new MultiplePathSpec(ImmutableList.of(new StaticPathSpec("/xyz", null), new DatasourcePathSpec(jsonMapper, null, new DatasourceIngestionSpec(testDatasource, testDatasourceInterval, null, null, null, null, null, null, false), null)));
    HadoopDruidIndexerConfig config = testRunUpdateSegmentListIfDatasourcePathSpecIsUsed(pathSpec, testDatasourceInterval);
    Assert.assertEquals(ImmutableList.of(WindowedDataSegment.of(SEGMENT)), ((DatasourcePathSpec) ((MultiplePathSpec) config.getPathSpec()).getChildren().get(1)).getSegments());
}
Also used : DatasourceIngestionSpec(io.druid.indexer.hadoop.DatasourceIngestionSpec) DatasourcePathSpec(io.druid.indexer.path.DatasourcePathSpec) StaticPathSpec(io.druid.indexer.path.StaticPathSpec) MultiplePathSpec(io.druid.indexer.path.MultiplePathSpec) DatasourcePathSpec(io.druid.indexer.path.DatasourcePathSpec) StaticPathSpec(io.druid.indexer.path.StaticPathSpec) PathSpec(io.druid.indexer.path.PathSpec) MultiplePathSpec(io.druid.indexer.path.MultiplePathSpec) Test(org.junit.Test)

Aggregations

DatasourcePathSpec (io.druid.indexer.path.DatasourcePathSpec)2 MultiplePathSpec (io.druid.indexer.path.MultiplePathSpec)2 PathSpec (io.druid.indexer.path.PathSpec)2 StaticPathSpec (io.druid.indexer.path.StaticPathSpec)2 Test (org.junit.Test)2 DatasourceIngestionSpec (io.druid.indexer.hadoop.DatasourceIngestionSpec)1