Search in sources :

Example 21 with SingleDimensionPartitionsSpec

use of org.apache.druid.indexer.partitions.SingleDimensionPartitionsSpec in project druid by druid-io.

the class NewestSegmentFirstIteratorTest method testFindPartitionsSpecFromConfigWithRangePartitionsSpec.

@Test
public void testFindPartitionsSpecFromConfigWithRangePartitionsSpec() {
    final DataSourceCompactionConfig config = new DataSourceCompactionConfig("datasource", null, null, null, null, new UserCompactionTaskQueryTuningConfig(null, null, null, null, new SingleDimensionPartitionsSpec(10000, null, "dim", false), null, null, null, null, null, null, null, null, null, null, null, null), null, null, null, null, null, null);
    Assert.assertEquals(new SingleDimensionPartitionsSpec(10000, null, "dim", false), NewestSegmentFirstIterator.findPartitionsSpecFromConfig(ClientCompactionTaskQueryTuningConfig.from(config.getTuningConfig(), config.getMaxRowsPerSegment())));
}
Also used : DataSourceCompactionConfig(org.apache.druid.server.coordinator.DataSourceCompactionConfig) UserCompactionTaskQueryTuningConfig(org.apache.druid.server.coordinator.UserCompactionTaskQueryTuningConfig) SingleDimensionPartitionsSpec(org.apache.druid.indexer.partitions.SingleDimensionPartitionsSpec) Test(org.junit.Test)

Aggregations

SingleDimensionPartitionsSpec (org.apache.druid.indexer.partitions.SingleDimensionPartitionsSpec)21 Test (org.junit.Test)18 List (java.util.List)7 Map (java.util.Map)6 DataSegment (org.apache.druid.timeline.DataSegment)6 Interval (org.joda.time.Interval)6 ImmutableList (com.google.common.collect.ImmutableList)5 ArrayList (java.util.ArrayList)5 HashedPartitionsSpec (org.apache.druid.indexer.partitions.HashedPartitionsSpec)5 PartitionsSpec (org.apache.druid.indexer.partitions.PartitionsSpec)5 ImmutableMap (com.google.common.collect.ImmutableMap)4 HashMap (java.util.HashMap)4 DimensionsSpec (org.apache.druid.data.input.impl.DimensionsSpec)4 DynamicPartitionsSpec (org.apache.druid.indexer.partitions.DynamicPartitionsSpec)4 SingleDimensionShardSpec (org.apache.druid.timeline.partition.SingleDimensionShardSpec)4 IOException (java.io.IOException)3 TaskStatus (org.apache.druid.indexer.TaskStatus)3 TaskToolbox (org.apache.druid.indexing.common.TaskToolbox)3 TaskActionClient (org.apache.druid.indexing.common.actions.TaskActionClient)3 Builder (org.apache.druid.indexing.common.task.CompactionTask.Builder)3