Search in sources :

Example 1 with FillCapacityWorkerSelectStrategy

use of io.druid.indexing.overlord.setup.FillCapacityWorkerSelectStrategy in project druid by druid-io.

the class PendingTaskBasedResourceManagementStrategyTest method setUp.

@Before
public void setUp() throws Exception {
    autoScaler = EasyMock.createMock(AutoScaler.class);
    testTask = TestTasks.immediateSuccess("task1");
    config = new PendingTaskBasedWorkerResourceManagementConfig().setMaxScalingDuration(new Period(1000)).setNumEventsToTrack(10).setPendingTaskTimeout(new Period(0)).setWorkerVersion(MIN_VERSION).setMaxScalingStep(2);
    workerConfig = new AtomicReference<>(new WorkerBehaviorConfig(new FillCapacityWorkerSelectStrategy(), autoScaler));
    strategy = new PendingTaskBasedWorkerResourceManagementStrategy(config, DSuppliers.of(workerConfig), new ResourceManagementSchedulerConfig(), executorService);
}
Also used : WorkerBehaviorConfig(io.druid.indexing.overlord.setup.WorkerBehaviorConfig) FillCapacityWorkerSelectStrategy(io.druid.indexing.overlord.setup.FillCapacityWorkerSelectStrategy) Period(org.joda.time.Period) Before(org.junit.Before)

Aggregations

FillCapacityWorkerSelectStrategy (io.druid.indexing.overlord.setup.FillCapacityWorkerSelectStrategy)1 WorkerBehaviorConfig (io.druid.indexing.overlord.setup.WorkerBehaviorConfig)1 Period (org.joda.time.Period)1 Before (org.junit.Before)1