@InterfaceAudience.Private public class FavoredNodesPlan extends Object
FavoredNodeLoadBalancer set
of classes and from unit tests (hence the class is public)
All the access to this class is thread-safe.| Modifier and Type | Class and Description |
|---|---|
static class |
FavoredNodesPlan.Position |
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
LOG |
| Constructor and Description |
|---|
FavoredNodesPlan() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Map<HRegionInfo,List<ServerName>> |
getAssignmentMap() |
List<ServerName> |
getFavoredNodes(HRegionInfo region) |
static FavoredNodesPlan.Position |
getFavoredServerPosition(List<ServerName> favoredNodes,
ServerName server)
Return the position of the server in the favoredNodes list.
|
int |
hashCode() |
void |
updateAssignmentPlan(HRegionInfo region,
List<ServerName> servers)
Add an assignment to the plan
|
void |
updateFavoredNodesMap(HRegionInfo region,
List<ServerName> servers)
Add an assignment to the plan
|
public void updateFavoredNodesMap(HRegionInfo region, List<ServerName> servers)
region - servers - public List<ServerName> getFavoredNodes(HRegionInfo region)
region - public static FavoredNodesPlan.Position getFavoredServerPosition(List<ServerName> favoredNodes, ServerName server)
favoredNodes - server - public Map<HRegionInfo,List<ServerName>> getAssignmentMap()
public void updateAssignmentPlan(HRegionInfo region, List<ServerName> servers)
region - servers - Copyright © 2014 The Apache Software Foundation. All rights reserved.