Class BalanceParamsImpl
- java.lang.Object
-
- org.apache.accumulo.core.manager.balancer.BalanceParamsImpl
-
- All Implemented Interfaces:
TabletBalancer.BalanceParameters
public class BalanceParamsImpl extends Object implements TabletBalancer.BalanceParameters
-
-
Constructor Summary
Constructors Constructor Description BalanceParamsImpl(SortedMap<TabletServerId,TServerStatus> currentStatus, Set<TabletId> currentMigrations, List<TabletMigration> migrationsOut)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMigration(KeyExtent extent, TServerInstance oldServer, TServerInstance newServer)
Set<TabletId>
currentMigrations()
SortedMap<TabletServerId,TServerStatus>
currentStatus()
static BalanceParamsImpl
fromThrift(SortedMap<TabletServerId,TServerStatus> currentStatus, SortedMap<TServerInstance,TabletServerStatus> thriftCurrentStatus, Set<KeyExtent> thriftCurrentMigrations)
List<TabletMigration>
migrationsOut()
Set<KeyExtent>
thriftCurrentMigrations()
SortedMap<TServerInstance,TabletServerStatus>
thriftCurrentStatus()
-
-
-
Constructor Detail
-
BalanceParamsImpl
public BalanceParamsImpl(SortedMap<TabletServerId,TServerStatus> currentStatus, Set<TabletId> currentMigrations, List<TabletMigration> migrationsOut)
-
-
Method Detail
-
fromThrift
public static BalanceParamsImpl fromThrift(SortedMap<TabletServerId,TServerStatus> currentStatus, SortedMap<TServerInstance,TabletServerStatus> thriftCurrentStatus, Set<KeyExtent> thriftCurrentMigrations)
-
currentStatus
public SortedMap<TabletServerId,TServerStatus> currentStatus()
- Specified by:
currentStatus
in interfaceTabletBalancer.BalanceParameters
- Returns:
- the current status for all tablet servers (read-only)
-
currentMigrations
public Set<TabletId> currentMigrations()
- Specified by:
currentMigrations
in interfaceTabletBalancer.BalanceParameters
- Returns:
- the migrations that are currently in progress (read-only)
-
migrationsOut
public List<TabletMigration> migrationsOut()
- Specified by:
migrationsOut
in interfaceTabletBalancer.BalanceParameters
- Returns:
- a write-only map for storing new assignments made by the balancer. It is important
that any tablets found in
TabletBalancer.BalanceParameters.currentMigrations()
are not included in the output migrations.
-
thriftCurrentStatus
public SortedMap<TServerInstance,TabletServerStatus> thriftCurrentStatus()
-
addMigration
public void addMigration(KeyExtent extent, TServerInstance oldServer, TServerInstance newServer)
-
-