All Methods Static Methods Instance Methods Concrete Methods
Modifier and Type |
Method and Description |
boolean |
canPlaceFavoredNodes() |
private Map<RegionInfo,List<ServerName>> |
generateFavoredNodes(Map<RegionInfo,ServerName> primaryRSMap) |
List<ServerName> |
generateFavoredNodes(RegionInfo hri) |
Map<RegionInfo,List<ServerName>> |
generateFavoredNodesRoundRobin(Map<ServerName,List<RegionInfo>> assignmentMap,
List<RegionInfo> regions) |
ServerName |
generateMissingFavoredNode(List<ServerName> favoredNodes) |
ServerName |
generateMissingFavoredNode(List<ServerName> favoredNodes,
List<ServerName> excludeNodes) |
private ServerName |
generateMissingFavoredNodeMultiRack(List<ServerName> favoredNodes) |
private ServerName |
generateMissingFavoredNodeMultiRack(List<ServerName> favoredNodes,
List<ServerName> excludeNodes) |
private ServerName |
generateMissingFavoredNodeSingleRack(List<ServerName> favoredNodes,
List<ServerName> excludeNodes) |
static byte[] |
getFavoredNodes(List<ServerName> serverAddrList)
n * @return PB'ed bytes of HBaseProtos.FavoredNodes generated by the server list.
|
static String |
getFavoredNodesAsString(List<ServerName> nodes) |
static ServerName[] |
getFavoredNodesList(byte[] favoredNodes)
Convert PB bytes to ServerName.
|
(package private) String |
getOneRandomRack(Set<String> skipRackSet) |
private ServerName |
getOneRandomServer(String rack) |
protected ServerName |
getOneRandomServer(String rack,
Set<ServerName> skipServerSet)
Gets a random server from the specified rack and skips anything specified.
|
private String |
getRackOfServer(ServerName sn) |
ServerName[] |
getSecondaryAndTertiary(RegionInfo regionInfo,
ServerName primaryRS) |
private List<ServerName> |
getServersFromRack(String rack) |
private int |
getTotalNumberOfRacks() |
void |
initialize() |
private static Put |
makePut(RegionInfo regionInfo,
List<ServerName> favoredNodeList) |
private Map<ServerName,Set<RegionInfo>> |
mapRSToPrimaries(Map<RegionInfo,ServerName> primaryRSMap) |
private ServerName[] |
multiRackCase(ServerName primaryRS,
String primaryRack)
Place secondary and tertiary nodes in a multi rack case.
|
private ServerName[] |
multiRackCaseWithRestrictions(Map<ServerName,Set<RegionInfo>> serverToPrimaries,
Map<RegionInfo,ServerName[]> secondaryAndTertiaryMap,
String primaryRack,
ServerName primaryRS,
RegionInfo regionInfo) |
void |
placePrimaryRSAsRoundRobin(Map<ServerName,List<RegionInfo>> assignmentMap,
Map<RegionInfo,ServerName> primaryRSMap,
List<RegionInfo> regions) |
Map<RegionInfo,ServerName[]> |
placeSecondaryAndTertiaryRS(Map<RegionInfo,ServerName> primaryRSMap) |
Map<RegionInfo,ServerName[]> |
placeSecondaryAndTertiaryWithRestrictions(Map<RegionInfo,ServerName> primaryRSMap)
For regions that share the primary, avoid placing the secondary and tertiary on a same RS.
|
private ServerName[] |
singleRackCase(RegionInfo regionInfo,
ServerName primaryRS,
String primaryRack) |
static void |
updateMetaWithFavoredNodesInfo(Map<RegionInfo,List<ServerName>> regionToFavoredNodes,
org.apache.hadoop.conf.Configuration conf)
Update meta table with favored nodes info
|
static void |
updateMetaWithFavoredNodesInfo(Map<RegionInfo,List<ServerName>> regionToFavoredNodes,
Connection connection)
Update meta table with favored nodes info
|