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
3f7d2897a1
commit
c1d299fc1d
|
@ -39,7 +39,6 @@ import org.apache.hadoop.hbase.favored.FavoredNodesPlan.Position;
|
|||
import org.apache.hadoop.hbase.master.MasterServices;
|
||||
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;
|
||||
|
@ -86,17 +85,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(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 = services.getServerManager();
|
||||
for (ServerName sn : serverMgr.getOnlineServersList()) {
|
||||
|
|
Loading…
Reference in New Issue