org.apache.accumulo.server.master.balancer
public class ChaoticLoadBalancer extends TabletBalancer
TabletBalancer.BalancerProblem, TabletBalancer.NoTservers, TabletBalancer.OutstandingMigrations| Modifier and Type | Field and Description |
|---|---|
protected TabletBalancer.OutstandingMigrations |
outstandingMigrations |
configuration, TIME_BETWEEN_BALANCER_WARNINGS| Constructor and Description |
|---|
ChaoticLoadBalancer() |
| Modifier and Type | Method and Description |
|---|---|
long |
balance(SortedMap<TServerInstance,TabletServerStatus> current,
Set<KeyExtent> migrations,
List<TabletMigration> migrationsOut)
Will balance randomly, maintaining distribution
|
void |
getAssignments(SortedMap<TServerInstance,TabletServerStatus> current,
Map<KeyExtent,TServerInstance> unassigned,
Map<KeyExtent,TServerInstance> assignments)
Assign tablets to tablet servers.
|
void |
init(ServerConfiguration conf)
Initialize the TabletBalancer.
|
checkMigrationSanity, constraintNotMet, getOnlineTabletsForTable, resetBalancerErrorsprotected final TabletBalancer.OutstandingMigrations outstandingMigrations
public void getAssignments(SortedMap<TServerInstance,TabletServerStatus> current, Map<KeyExtent,TServerInstance> unassigned, Map<KeyExtent,TServerInstance> assignments)
TabletBalancergetAssignments in class TabletBalancercurrent - The current table-summary state of all the online tablet servers. Read-only. The TabletServerStatus for each server may be null if the tablet
server has not yet responded to a recent request for status.unassigned - A map from unassigned tablet to the last known tablet server. Read-only.assignments - A map from tablet to assigned server. Write-only.public long balance(SortedMap<TServerInstance,TabletServerStatus> current, Set<KeyExtent> migrations, List<TabletMigration> migrationsOut)
balance in class TabletBalancercurrent - The current table-summary state of all the online tablet servers. Read-only.migrations - the current set of migrations. Read-only.migrationsOut - new migrations to perform; should not contain tablets in the current set of migrations. Write-only.public void init(ServerConfiguration conf)
TabletBalancerinit in class TabletBalancerCopyright © 2011–2016 The Apache Software Foundation. All rights reserved.