HBASE-22487 getMostLoadedRegions is unused

Signed-off-by: Wellington Chevreuil <wellington.chevreuil@gmail.com>
Signed-off-by: Peter Somogyi <psomogyi@apache.org>
This commit is contained in:
Clay Baenziger 2019-05-27 21:57:15 -04:00 committed by Peter Somogyi
parent e0197ac615
commit 1b2f863cdb
1 changed files with 0 additions and 21 deletions

View File

@ -2657,27 +2657,6 @@ public class HRegionServer extends HasThread implements
return this.cacheFlusher;
}
/**
* Get the top N most loaded regions this server is serving so we can tell the
* master which regions it can reallocate if we're overloaded. TODO: actually
* calculate which regions are most loaded. (Right now, we're just grabbing
* the first N regions being served regardless of load.)
*/
protected HRegionInfo[] getMostLoadedRegions() {
ArrayList<HRegionInfo> regions = new ArrayList<HRegionInfo>();
for (Region r : onlineRegions.values()) {
if (!r.isAvailable()) {
continue;
}
if (regions.size() < numRegionsToReport) {
regions.add(r.getRegionInfo());
} else {
break;
}
}
return regions.toArray(new HRegionInfo[regions.size()]);
}
@Override
public Leases getLeases() {
return leases;