Class TableLoadBalancer
java.lang.Object
org.apache.accumulo.core.spi.balancer.TableLoadBalancer
- All Implemented Interfaces:
TabletBalancer
- Direct Known Subclasses:
HostRegexTableLoadBalancer
- Since:
- 2.1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.accumulo.core.spi.balancer.TabletBalancer
TabletBalancer.AssignmentParameters, TabletBalancer.BalanceParameters -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongAsk the balancer if any migrations are necessary.voidAssign tablets to tablet servers.protected TabletBalancergetBalancerForTable(TableId tableId) protected Stringvoidinit(BalancerEnvironment balancerEnvironment) Initialize the TabletBalancer.
-
Field Details
-
environment
-
-
Constructor Details
-
TableLoadBalancer
public TableLoadBalancer()
-
-
Method Details
-
init
Description copied from interface:TabletBalancerInitialize the TabletBalancer. This gives the balancer the opportunity to read the configuration.- Specified by:
initin interfaceTabletBalancer
-
getLoadBalancerClassNameForTable
-
getBalancerForTable
-
getAssignments
Description copied from interface:TabletBalancerAssign tablets to tablet servers. This method is called whenever the manager finds tablets that are unassigned.- Specified by:
getAssignmentsin interfaceTabletBalancer
-
balance
Description copied from interface:TabletBalancerAsk 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.- Specified by:
balancein interfaceTabletBalancer- Returns:
- the time, in milliseconds, to wait before re-balancing.
-