Map<HServerInfo, List<HRegionInfo>> assignmentMap)
{
Map<String, Map<String, Integer>> tableMap = new HashMap<String, Map<String, Integer>>();
for (Map.Entry<HServerInfo, List<HRegionInfo>> entry : assignmentMap.entrySet())
{
HServerInfo hServerInfo = entry.getKey();
List<HRegionInfo> regionList = entry.getValue();
for (HRegionInfo regionInfo : regionList)
{
String tableName = regionInfo.getTableDesc().getNameAsString();
Map<String, Integer> map = tableMap.get(tableName);
if (map == null)
{
map = new HashMap<String, Integer>();
tableMap.put(tableName, map);
}
String serverName = getServerName(hServerInfo.getServerName());
Integer serverRegionCount = map.get(serverName);
if (serverRegionCount == null)
{
serverRegionCount = Integer.valueOf(1);
}