HBASE-25806 Backport the region location finder initialization fix in HBASE-25802 (#3196)
Signed-off-by: Yulin Niu <niuyulin@apache.org>
This commit is contained in:
parent
1dc881ab85
commit
e765e19279
|
@ -103,8 +103,7 @@ public abstract class BaseLoadBalancer implements LoadBalancer {
|
|||
* The constructor that uses the basic MetricsBalancer
|
||||
*/
|
||||
protected BaseLoadBalancer() {
|
||||
metricsBalancer = new MetricsBalancer();
|
||||
createRegionFinder();
|
||||
this(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1060,7 +1059,9 @@ public abstract class BaseLoadBalancer implements LoadBalancer {
|
|||
this.onlySystemTablesOnMaster = LoadBalancer.isSystemTablesOnlyOnMaster(this.config);
|
||||
|
||||
this.rackManager = new RackManager(getConf());
|
||||
useRegionFinder = config.getBoolean("hbase.master.balancer.uselocality", true);
|
||||
if (useRegionFinder) {
|
||||
regionFinder = new RegionLocationFinder();
|
||||
regionFinder.setConf(conf);
|
||||
}
|
||||
this.isByTable = conf.getBoolean(HConstants.HBASE_MASTER_LOADBALANCE_BYTABLE, isByTable);
|
||||
|
|
Loading…
Reference in New Issue