@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 | 
|---|---|
| private Map<String,List<ServerName>> | favoredNodesMapThe map between each region name and its favored region server list | 
| Constructor and Description | 
|---|
| FavoredNodesPlan() | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object o) | 
| Map<String,List<ServerName>> | getAssignmentMap()Return the mapping between each region to its favored region server list. | 
| List<ServerName> | getFavoredNodes(RegionInfo region)Returns the list of favored region server for this region based on the plan | 
| static FavoredNodesPlan.Position | getFavoredServerPosition(List<ServerName> favoredNodes,
                        ServerName server)Return the position of the server in the favoredNodes list. | 
| int | hashCode() | 
| (package private) List<ServerName> | removeFavoredNodes(RegionInfo region)Remove a favored node assignment | 
| int | size() | 
| (package private) void | updateFavoredNodesMap(FavoredNodesPlan fnp)Add to existing Map of FavoredNodes. | 
| void | updateFavoredNodesMap(RegionInfo region,
                     List<ServerName> servers)Update an assignment to the plan | 
private final Map<String,List<ServerName>> favoredNodesMap
public FavoredNodesPlan()
void updateFavoredNodesMap(FavoredNodesPlan fnp)
public void updateFavoredNodesMap(RegionInfo region, List<ServerName> servers)
List<ServerName> removeFavoredNodes(RegionInfo region)
public List<ServerName> getFavoredNodes(RegionInfo region)
public static FavoredNodesPlan.Position getFavoredServerPosition(List<ServerName> favoredNodes, ServerName server)
public Map<String,List<ServerName>> getAssignmentMap()
public int size()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.