public class ReplicationThrottler extends Object
CoordinatorDynamicConfig.getReplicationThrottleLimit() - Maximum
number of replicas that can be assigned to a tier in a single run.CoordinatorDynamicConfig.getMaxNonPrimaryReplicantsToLoad() -
Maximum number of total replicas that can be assigned across all tiers in a
single run.| Constructor and Description |
|---|
ReplicationThrottler(Set<String> tiersLoadingReplicas,
int replicationThrottleLimit,
int maxReplicaAssignmentsInRun)
Creates a new ReplicationThrottler for use during a single coordinator run.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canAssignReplica(String tier) |
void |
incrementAssignedReplicas(String tier) |
boolean |
isTierLoadingReplicas(String tier) |
public ReplicationThrottler(Set<String> tiersLoadingReplicas, int replicationThrottleLimit, int maxReplicaAssignmentsInRun)
tiersLoadingReplicas - Set of tier names which are already loading
replicas and will not be eligible for loading
more replicas in this run.replicationThrottleLimit - Maximum number of replicas that can be
assigned to a single tier in the current run.maxReplicaAssignmentsInRun - Max number of total replicas that can be
assigned across all tiers in the current run.Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.