Package org.apache.hadoop.hbase.master
Class TestMasterBalancerNPE.MyLoadBalancer
java.lang.Object
org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer
org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer
org.apache.hadoop.hbase.master.TestMasterBalancerNPE.MyLoadBalancer
- All Implemented Interfaces:
org.apache.hadoop.hbase.conf.ConfigurationObserver
,org.apache.hadoop.hbase.master.LoadBalancer
,org.apache.hadoop.hbase.Stoppable
- Enclosing class:
- TestMasterBalancerNPE
static class TestMasterBalancerNPE.MyLoadBalancer
extends org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer
Define this class because the test needs to override
StochasticLoadBalancer.balanceTable(org.apache.hadoop.hbase.TableName, java.util.Map<org.apache.hadoop.hbase.ServerName, java.util.List<org.apache.hadoop.hbase.client.RegionInfo>>)
, which is protected.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer
org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer.GeneratorType
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer
candidateGenerators, COST_FUNCTIONS_COST_FUNCTIONS_KEY, costFunctions, DEFAULT_KEEP_REGION_LOADS, DEFAULT_MAX_RUNNING_TIME, DEFAULT_MAX_STEPS, DEFAULT_MIN_COST_NEED_BALANCE, DEFAULT_RUN_MAX_STEPS, DEFAULT_STEPS_PER_REGION, KEEP_REGION_LOADS, MAX_RUNNING_TIME_KEY, MAX_STEPS_KEY, MIN_COST_NEED_BALANCE_KEY, OVERALL_COST_FUNCTION_NAME, RUN_MAX_STEPS_KEY, STEPS_PER_REGION_KEY
Fields inherited from class org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer
BALANCER_DECISION_BUFFER_ENABLED, BALANCER_REJECTION_BUFFER_ENABLED, clusterStatus, DEFAULT_BALANCER_DECISION_BUFFER_ENABLED, DEFAULT_BALANCER_REJECTION_BUFFER_ENABLED, DEFAULT_HBASE_MASTER_LOADBALANCE_BYTABLE, isByTable, masterServerName, metricsBalancer, MIN_SERVER_BALANCE, onlySystemTablesOnMaster, rackManager, regionFinder, services, slop, useRegionFinder
Fields inherited from interface org.apache.hadoop.hbase.master.LoadBalancer
BOGUS_SERVER_NAME, SYSTEM_TABLES_ON_MASTER, TABLES_ON_MASTER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.apache.hadoop.hbase.master.RegionPlan>
balanceTable
(org.apache.hadoop.hbase.TableName tableName, Map<org.apache.hadoop.hbase.ServerName, List<org.apache.hadoop.hbase.client.RegionInfo>> loadOfOneTable) Methods inherited from class org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer
createCandidateGenerators, createCostFunctions, functionCost, getRandomGenerator, loadConf, updateBalancerLoadInfo, updateClusterMetrics
Methods inherited from class org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer
assignMasterSystemRegions, balanceCluster, balanceMasterRegions, getConf, getDefaultSlop, idleRegionServerExist, initialize, isStopped, onConfigurationChange, postMasterStartupInitialize, preBalanceCluster, randomAssignment, regionOffline, regionOnline, retainAssignment, roundRobinAssignment, setMasterServices, shouldBeOnMaster, sloppyRegionServerExist, stop, toEnsumbleTableLoad, updateBalancerStatus
-
Constructor Details
-
MyLoadBalancer
-
-
Method Details
-
balanceTable
protected List<org.apache.hadoop.hbase.master.RegionPlan> balanceTable(org.apache.hadoop.hbase.TableName tableName, Map<org.apache.hadoop.hbase.ServerName, List<org.apache.hadoop.hbase.client.RegionInfo>> loadOfOneTable) - Overrides:
balanceTable
in classorg.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer
-