Class 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:
    • 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 current replicationThrottleLimit. Thus, if a tier was already loading k replicas at the start of a coordinator run, it may be assigned only replicationThrottleLimit - k more 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 Detail

      • isReplicationThrottledForTier

        public boolean isReplicationThrottledForTier​(String tier)
      • incrementAssignedReplicas

        public void incrementAssignedReplicas​(String tier)