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:
parent
e4f4ae835f
commit
4657c90991
@ -2917,27 +2917,6 @@ public class HRegionServer extends HasThread implements
|
|||||||
return this.compactSplitThread;
|
return this.compactSplitThread;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 RegionInfo[] getMostLoadedRegions() {
|
|
||||||
ArrayList<RegionInfo> regions = new ArrayList<>();
|
|
||||||
for (Region r : onlineRegions.values()) {
|
|
||||||
if (!r.isAvailable()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (regions.size() < numRegionsToReport) {
|
|
||||||
regions.add(r.getRegionInfo());
|
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return regions.toArray(new RegionInfo[regions.size()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Leases getLeases() {
|
public Leases getLeases() {
|
||||||
return leases;
|
return leases;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user