Class PrepareBalancerAndLoadQueues
java.lang.Object
org.apache.druid.server.coordinator.duty.PrepareBalancerAndLoadQueues
- All Implemented Interfaces:
CoordinatorDuty
This duty does the following:
- Creates an immutable
DruidClusterconsisting ofServerHolders which represent the current state of the servers in the cluster. - Starts and stops load peons for new and disappeared servers respectively.
- Cancels in-progress loads on all decommissioning servers. This is done
here to ensure that under-replicated segments are assigned to active servers
in the
RunRulesduty after this. - Initializes the
BalancerStrategyfor the run.
-
Constructor Summary
ConstructorsConstructorDescriptionPrepareBalancerAndLoadQueues(LoadQueueTaskMaster taskMaster, SegmentLoadQueueManager loadQueueManager, BalancerStrategyFactory balancerStrategyFactory, ServerInventoryView serverInventoryView) -
Method Summary
Modifier and TypeMethodDescriptionrun(DruidCoordinatorRuntimeParams params) Implementations of this method run various activities performed by the coordinator.
-
Constructor Details
-
PrepareBalancerAndLoadQueues
public PrepareBalancerAndLoadQueues(LoadQueueTaskMaster taskMaster, SegmentLoadQueueManager loadQueueManager, BalancerStrategyFactory balancerStrategyFactory, ServerInventoryView serverInventoryView)
-
-
Method Details
-
run
Description copied from interface:CoordinatorDutyImplementations of this method run various activities performed by the coordinator. Input params can be used and modified. The returned DruidCoordinatorRuntimeParams is passed to the next duty.- Specified by:
runin interfaceCoordinatorDuty- Returns:
- same as input or a modified value to be used by next duty. Null return
values will prevent subsequent CoordinatorDuty objects (see the order in the lists passed into the constructor of
DruidCoordinator.DutiesRunnable) from running until the next cycle.
-