Class ReplicationThrottler
java.lang.Object
org.apache.druid.server.coordinator.loading.ReplicationThrottler
The ReplicationThrottler is used to throttle the number of segment replicas
that are assigned to a load queue in a single run. This is achieved by setting
the values of the following configs:
CoordinatorDynamicConfig.getReplicationThrottleLimit()- Maximum number of replicas that can be assigned to a tier in a single run.
-
Constructor Summary
ConstructorsConstructorDescriptionReplicationThrottler(Map<String, Integer> tierToLoadingReplicaCount, int replicationThrottleLimit) Creates a new ReplicationThrottler for use during a single coordinator run. -
Method Summary
Modifier and TypeMethodDescriptionvoidboolean
-
Constructor Details
-
ReplicationThrottler
public ReplicationThrottler(Map<String, Integer> tierToLoadingReplicaCount, int replicationThrottleLimit) Creates a new ReplicationThrottler for use during a single coordinator run. The number of replicas loading on a tier must always be within the currentreplicationThrottleLimit. Thus, if a tier was already loadingkreplicas at the start of a coordinator run, it may be assigned onlyreplicationThrottleLimit - kmore replicas during the run.- Parameters:
tierToLoadingReplicaCount- Map from tier name to number of replicas already being loaded.replicationThrottleLimit- Maximum number of replicas that can be assigned to a single tier in the current run.
-
-
Method Details
-
isReplicationThrottledForTier
-
incrementAssignedReplicas
-