use of org.apache.druid.indexing.overlord.ImmutableWorkerInfo in project druid by druid-io.
the class FillCapacityWithCategorySpecWorkerSelectStrategyTest method selectWorker.
private ImmutableWorkerInfo selectWorker(WorkerCategorySpec workerCategorySpec) {
final FillCapacityWithCategorySpecWorkerSelectStrategy strategy = new FillCapacityWithCategorySpecWorkerSelectStrategy(workerCategorySpec);
ImmutableWorkerInfo worker = strategy.findWorkerForTask(new RemoteTaskRunnerConfig(), WORKERS_FOR_TIER_TESTS, new NoopTask(null, null, "ds1", 1, 0, null, null, null));
return worker;
}
use of org.apache.druid.indexing.overlord.ImmutableWorkerInfo in project druid by druid-io.
the class FillCapacityWithCategorySpecWorkerSelectStrategyTest method testWeakTierSpec.
@Test
public void testWeakTierSpec() {
final WorkerCategorySpec workerCategorySpec = new WorkerCategorySpec(ImmutableMap.of("noop", new WorkerCategorySpec.CategoryConfig("c1", ImmutableMap.of("ds1", "c3"))), false);
ImmutableWorkerInfo worker = selectWorker(workerCategorySpec);
Assert.assertEquals("localhost3", worker.getWorker().getHost());
}
Aggregations