Class ReplicationThrottler
- java.lang.Object
-
- org.apache.druid.server.coordinator.loading.ReplicationThrottler
-
public class ReplicationThrottler extends Object
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
Constructors Constructor Description ReplicationThrottler(Map<String,Integer> tierToLoadingReplicaCount, int replicationThrottleLimit)Creates a new ReplicationThrottler for use during a single coordinator run.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidincrementAssignedReplicas(String tier)booleanisReplicationThrottledForTier(String tier)
-
-
-
Constructor Detail
-
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.
-
-