Search in sources :

Example 1 with CostBalancerStrategyFactory

use of org.apache.druid.server.coordinator.CostBalancerStrategyFactory in project druid by druid-io.

the class LoadRuleTest method setUp.

@Before
public void setUp() {
    EmittingLogger.registerEmitter(EMITTER);
    EMITTER.start();
    throttler = EasyMock.createMock(ReplicationThrottler.class);
    exec = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(1));
    balancerStrategy = new CostBalancerStrategyFactory().createBalancerStrategy(exec);
    cachingCostBalancerStrategy = new CachingCostBalancerStrategy(ClusterCostCache.builder().build(), exec);
    mockBalancerStrategy = EasyMock.createMock(BalancerStrategy.class);
}
Also used : BalancerStrategy(org.apache.druid.server.coordinator.BalancerStrategy) CachingCostBalancerStrategy(org.apache.druid.server.coordinator.CachingCostBalancerStrategy) ReplicationThrottler(org.apache.druid.server.coordinator.ReplicationThrottler) CostBalancerStrategyFactory(org.apache.druid.server.coordinator.CostBalancerStrategyFactory) CachingCostBalancerStrategy(org.apache.druid.server.coordinator.CachingCostBalancerStrategy) Before(org.junit.Before)

Aggregations

BalancerStrategy (org.apache.druid.server.coordinator.BalancerStrategy)1 CachingCostBalancerStrategy (org.apache.druid.server.coordinator.CachingCostBalancerStrategy)1 CostBalancerStrategyFactory (org.apache.druid.server.coordinator.CostBalancerStrategyFactory)1 ReplicationThrottler (org.apache.druid.server.coordinator.ReplicationThrottler)1 Before (org.junit.Before)1