Class AssignmentParamsImpl
- java.lang.Object
-
- org.apache.accumulo.core.manager.balancer.AssignmentParamsImpl
-
- All Implemented Interfaces:
TabletBalancer.AssignmentParameters
public class AssignmentParamsImpl extends Object implements TabletBalancer.AssignmentParameters
-
-
Constructor Summary
Constructors Constructor Description AssignmentParamsImpl(SortedMap<TabletServerId,TServerStatus> currentStatus, Map<TabletId,TabletServerId> unassigned, Map<TabletId,TabletServerId> assignmentsOut)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAssignment(TabletId tabletId, TabletServerId tabletServerId)
AssignstabletId
totabletServerId
.SortedMap<TabletServerId,TServerStatus>
currentStatus()
static AssignmentParamsImpl
fromThrift(SortedMap<TServerInstance,TabletServerStatus> currentStatus, Map<KeyExtent,TServerInstance> unassigned, Map<KeyExtent,TServerInstance> assignmentsOut)
Map<KeyExtent,TServerInstance>
thriftAssignmentsOut()
SortedMap<TServerInstance,TabletServerStatus>
thriftCurrentStatus()
Map<KeyExtent,TServerInstance>
thriftUnassigned()
Map<TabletId,TabletServerId>
unassignedTablets()
-
-
-
Constructor Detail
-
AssignmentParamsImpl
public AssignmentParamsImpl(SortedMap<TabletServerId,TServerStatus> currentStatus, Map<TabletId,TabletServerId> unassigned, Map<TabletId,TabletServerId> assignmentsOut)
-
-
Method Detail
-
fromThrift
public static AssignmentParamsImpl fromThrift(SortedMap<TServerInstance,TabletServerStatus> currentStatus, Map<KeyExtent,TServerInstance> unassigned, Map<KeyExtent,TServerInstance> assignmentsOut)
-
currentStatus
public SortedMap<TabletServerId,TServerStatus> currentStatus()
- Specified by:
currentStatus
in interfaceTabletBalancer.AssignmentParameters
- Returns:
- the current status for all tablet servers (read-only)
-
unassignedTablets
public Map<TabletId,TabletServerId> unassignedTablets()
- Specified by:
unassignedTablets
in interfaceTabletBalancer.AssignmentParameters
- Returns:
- the tablets that need to be assigned, mapped to their previous known location (read-only)
-
addAssignment
public void addAssignment(TabletId tabletId, TabletServerId tabletServerId)
Description copied from interface:TabletBalancer.AssignmentParameters
AssignstabletId
totabletServerId
.- Specified by:
addAssignment
in interfaceTabletBalancer.AssignmentParameters
-
thriftCurrentStatus
public SortedMap<TServerInstance,TabletServerStatus> thriftCurrentStatus()
-
thriftUnassigned
public Map<KeyExtent,TServerInstance> thriftUnassigned()
-
thriftAssignmentsOut
public Map<KeyExtent,TServerInstance> thriftAssignmentsOut()
-
-