HBASE-25938 The SnapshotOfRegionAssignmentFromMeta.initialize call in FavoredNodeLoadBalancer is just a dummy one (#3329)
Signed-off-by: Yulin Niu <niuyulin@apache.org>
This commit is contained in:
parent
fada9884a4
commit
2a84fd40d3
|
@ -38,7 +38,6 @@ import org.apache.hadoop.hbase.client.RegionInfo;
|
|||
import org.apache.hadoop.hbase.favored.FavoredNodesPlan.Position;
|
||||
import org.apache.hadoop.hbase.master.RegionPlan;
|
||||
import org.apache.hadoop.hbase.master.ServerManager;
|
||||
import org.apache.hadoop.hbase.master.SnapshotOfRegionAssignmentFromMeta;
|
||||
import org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer;
|
||||
import org.apache.hadoop.hbase.util.Pair;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
@ -80,17 +79,6 @@ public class FavoredNodeLoadBalancer extends BaseLoadBalancer implements Favored
|
|||
Map<ServerName, List<RegionInfo>> loadOfOneTable) {
|
||||
// TODO. Look at is whether Stochastic loadbalancer can be integrated with this
|
||||
List<RegionPlan> plans = new ArrayList<>();
|
||||
// perform a scan of the meta to get the latest updates (if any)
|
||||
SnapshotOfRegionAssignmentFromMeta snaphotOfRegionAssignment =
|
||||
new SnapshotOfRegionAssignmentFromMeta(super.services.getConnection());
|
||||
try {
|
||||
snaphotOfRegionAssignment.initialize();
|
||||
} catch (IOException ie) {
|
||||
LOG.warn("Not running balancer since exception was thrown " + ie);
|
||||
return plans;
|
||||
}
|
||||
// This is not used? Findbugs says so: Map<ServerName, ServerName>
|
||||
// serverNameToServerNameWithoutCode = new HashMap<>();
|
||||
Map<ServerName, ServerName> serverNameWithoutCodeToServerName = new HashMap<>();
|
||||
ServerManager serverMgr = super.services.getServerManager();
|
||||
for (ServerName sn : serverMgr.getOnlineServersList()) {
|
||||
|
|
Loading…
Reference in New Issue