}
}
public boolean reOpenAllRegions(List<HRegionInfo> regions) throws IOException {
boolean done = false;
HTable table = null;
TreeMap<ServerName, List<HRegionInfo>> serverToRegions = Maps.newTreeMap();
NavigableMap<HRegionInfo, ServerName> hriHserverMapping;
LOG.info("Bucketing regions by region server...");
try {
table = new HTable(masterServices.getConfiguration(), tableName);
hriHserverMapping = table.getRegionLocations();
} finally {
if (table != null) {
table.close();
}
}
List<HRegionInfo> reRegions = new ArrayList<HRegionInfo>();
for (HRegionInfo hri : regions) {
ServerName rsLocation = hriHserverMapping.get(hri);