Package org.apache.accumulo.test
Class ChaoticLoadBalancer
- java.lang.Object
-
- org.apache.accumulo.test.ChaoticLoadBalancer
-
- All Implemented Interfaces:
TabletBalancer
public class ChaoticLoadBalancer extends Object implements TabletBalancer
A chaotic load balancer used for testing. It constantly shuffles tablets, preventing them from resting in a single location for very long. This is not designed for performance, do not use on production systems. I'm calling it the LokiLoadBalancer.Will balance randomly, maintaining distribution
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.accumulo.core.spi.balancer.TabletBalancer
TabletBalancer.AssignmentParameters, TabletBalancer.BalanceParameters
-
-
Field Summary
Fields Modifier and Type Field Description protected BalancerEnvironment
environment
-
Constructor Summary
Constructors Constructor Description ChaoticLoadBalancer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
balance(TabletBalancer.BalanceParameters params)
void
getAssignments(TabletBalancer.AssignmentParameters params)
protected List<TabletStatistics>
getOnlineTabletsForTable(TabletServerId tabletServerId, TableId tableId)
void
init(BalancerEnvironment balancerEnvironment)
-
-
-
Field Detail
-
environment
protected BalancerEnvironment environment
-
-
Method Detail
-
init
public void init(BalancerEnvironment balancerEnvironment)
- Specified by:
init
in interfaceTabletBalancer
-
getAssignments
public void getAssignments(TabletBalancer.AssignmentParameters params)
- Specified by:
getAssignments
in interfaceTabletBalancer
-
balance
public long balance(TabletBalancer.BalanceParameters params)
- Specified by:
balance
in interfaceTabletBalancer
-
getOnlineTabletsForTable
protected List<TabletStatistics> getOnlineTabletsForTable(TabletServerId tabletServerId, TableId tableId) throws AccumuloException, AccumuloSecurityException
-
-