use of org.apache.druid.server.coordinator.UserCompactionTaskQueryTuningConfig 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())));
}
use of org.apache.druid.server.coordinator.UserCompactionTaskQueryTuningConfig in project druid by druid-io.
the class NewestSegmentFirstIteratorTest method testFindPartitionsSpecFromConfigWithNonNullMaxTotalRowsReturnGivenValue.
@Test
public void testFindPartitionsSpecFromConfigWithNonNullMaxTotalRowsReturnGivenValue() {
final DataSourceCompactionConfig config = new DataSourceCompactionConfig("datasource", null, null, null, null, new UserCompactionTaskQueryTuningConfig(null, null, null, null, new DynamicPartitionsSpec(null, 1000L), null, null, null, null, null, null, null, null, null, null, null, null), null, null, null, null, null, null);
Assert.assertEquals(new DynamicPartitionsSpec(null, 1000L), NewestSegmentFirstIterator.findPartitionsSpecFromConfig(ClientCompactionTaskQueryTuningConfig.from(config.getTuningConfig(), config.getMaxRowsPerSegment())));
}
use of org.apache.druid.server.coordinator.UserCompactionTaskQueryTuningConfig in project druid by druid-io.
the class NewestSegmentFirstIteratorTest method testFindPartitionsSpecFromConfigWithHashPartitionsSpec.
@Test
public void testFindPartitionsSpecFromConfigWithHashPartitionsSpec() {
final DataSourceCompactionConfig config = new DataSourceCompactionConfig("datasource", null, null, null, null, new UserCompactionTaskQueryTuningConfig(null, null, null, null, new HashedPartitionsSpec(null, 10, ImmutableList.of("dim")), null, null, null, null, null, null, null, null, null, null, null, null), null, null, null, null, null, null);
Assert.assertEquals(new HashedPartitionsSpec(null, 10, ImmutableList.of("dim")), NewestSegmentFirstIterator.findPartitionsSpecFromConfig(ClientCompactionTaskQueryTuningConfig.from(config.getTuningConfig(), config.getMaxRowsPerSegment())));
}
use of org.apache.druid.server.coordinator.UserCompactionTaskQueryTuningConfig in project druid by druid-io.
the class NewestSegmentFirstIteratorTest method testFindPartitionsSpecFromConfigWithNonNullMaxRowsPerSegmentReturnGivenValue.
@Test
public void testFindPartitionsSpecFromConfigWithNonNullMaxRowsPerSegmentReturnGivenValue() {
final DataSourceCompactionConfig config = new DataSourceCompactionConfig("datasource", null, null, null, null, new UserCompactionTaskQueryTuningConfig(null, null, null, null, new DynamicPartitionsSpec(100, 1000L), null, null, null, null, null, null, null, null, null, null, null, null), null, null, null, null, null, null);
Assert.assertEquals(new DynamicPartitionsSpec(100, 1000L), NewestSegmentFirstIterator.findPartitionsSpecFromConfig(ClientCompactionTaskQueryTuningConfig.from(config.getTuningConfig(), config.getMaxRowsPerSegment())));
}
use of org.apache.druid.server.coordinator.UserCompactionTaskQueryTuningConfig in project druid by druid-io.
the class NewestSegmentFirstIteratorTest method testFindPartitionsSpecFromConfigWithDeprecatedMaxRowsPerSegmentAndMaxTotalRowsReturnGivenValues.
@Test
public void testFindPartitionsSpecFromConfigWithDeprecatedMaxRowsPerSegmentAndMaxTotalRowsReturnGivenValues() {
final DataSourceCompactionConfig config = new DataSourceCompactionConfig("datasource", null, null, 100, null, new UserCompactionTaskQueryTuningConfig(null, null, 1000L, null, null, null, null, null, null, null, null, null, null, null, null, null, null), null, null, null, null, null, null);
Assert.assertEquals(new DynamicPartitionsSpec(100, 1000L), NewestSegmentFirstIterator.findPartitionsSpecFromConfig(ClientCompactionTaskQueryTuningConfig.from(config.getTuningConfig(), config.getMaxRowsPerSegment())));
}
Aggregations