voldemort.client.rebalance
Class RebalanceScheduler

java.lang.Object
voldemort.client.rebalance.RebalanceScheduler

public class RebalanceScheduler

extends java.lang.Object

Scheduler for rebalancing tasks. There is at most one rebalancing task per
stealer-donor pair. This scheduler ensures the following invariant is obeyed:
A node works on no more than one rebalancing task at a time.
Note that a node working on a rebalancing task may be either a stealer or a
donor. This invariant should somewhat isolate the foreground workload against
the work a server must do for rebalancing. Because of this isolation, it is
safe to attempt "infinite" parallelism since no more than floor(number of
nodes / 2) rebalancing tasks can possibly be scheduled to execute while
obeying the invariant.
The order of tasks are randomized within this class. The intent is to
"spread" rebalancing work smoothly out over the cluster and avoid
"long tails" of straggler rebalancing tasks. Only experience will tell us if
we need to do anything smarter.