Interface TabletBalancer
- All Known Implementing Classes:
- GroupBalancer,- HostRegexTableLoadBalancer,- RegexGroupBalancer,- SimpleLoadBalancer,- TableLoadBalancer
public interface TabletBalancer
This class is responsible for managing the distribution of tablets throughout an Accumulo
 cluster. In most cases, users will want a balancer implementation which ensures a uniform
 distribution of tablets, so that no individual tablet server is handling significantly more work
 than any other.
 
 Implementations may wish to store configuration in Accumulo's system configuration using the
 Property.GENERAL_ARBITRARY_PROP_PREFIX. They may also benefit from using per-table
 configuration using Property.TABLE_ARBITRARY_PROP_PREFIX.
- Since:
- 2.1.0
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAn interface for grouping parameters required for the balancer to assign unassigned tablets.static interfaceAn interface for grouping parameters required for the balancer to balance tablets.
- 
Method SummaryModifier and TypeMethodDescriptionlongAsk the balancer if any migrations are necessary.voidAssign tablets to tablet servers.voidinit(BalancerEnvironment balancerEnvironment) Initialize the TabletBalancer.
- 
Method Details- 
initInitialize the TabletBalancer. This gives the balancer the opportunity to read the configuration.
- 
getAssignmentsAssign tablets to tablet servers. This method is called whenever the manager finds tablets that are unassigned.
- 
balanceAsk the balancer if any migrations are necessary. If the balancer is going to self-abort due to some environmental constraint (e.g. it requires some minimum number of tservers, or a maximum number of outstanding migrations), it should issue a log message to alert operators. The message should be at WARN normally and at ERROR if the balancer knows that the problem can not self correct. It should not issue these messages more than once a minute. This method will not be called when there are unassigned tablets.- Returns:
- the time, in milliseconds, to wait before re-balancing.
 
 
-