Java Code Examples for org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer#setClusterStatus()
The following examples show how to use
org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer#setClusterStatus() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CommandAdapter.java From hbase-tools with Apache License 2.0 | 5 votes |
public static List<RegionPlan> makePlan(HBaseAdmin admin, Map<ServerName, List<HRegionInfo>> clusterState, Configuration conf) throws IOException { StochasticLoadBalancer balancer = new StochasticLoadBalancer() { @Override protected boolean needsBalance(ClusterLoadState cs) { return true; } }; balancer.setConf(conf); balancer.setClusterStatus(admin.getClusterStatus()); List<RegionPlan> regionPlanList = balancer.balanceCluster(clusterState); return regionPlanList == null ? new ArrayList<RegionPlan>() : regionPlanList; }
Example 2
Source File: CommandAdapter.java From hbase-tools with Apache License 2.0 | 5 votes |
public static List<RegionPlan> makePlan(HBaseAdmin admin, Map<ServerName, List<HRegionInfo>> clusterState, Configuration conf) throws IOException { StochasticLoadBalancer balancer = new StochasticLoadBalancer() { @Override protected boolean needsBalance(Cluster c) { return true; } }; balancer.setConf(conf); balancer.setClusterStatus(admin.getClusterStatus()); List<RegionPlan> regionPlanList = balancer.balanceCluster(clusterState); return regionPlanList == null ? new ArrayList<RegionPlan>() : regionPlanList; }
Example 3
Source File: CommandAdapter.java From hbase-tools with Apache License 2.0 | 5 votes |
public static List<RegionPlan> makePlan(HBaseAdmin admin, Map<ServerName, List<HRegionInfo>> clusterState, Configuration conf) throws IOException { StochasticLoadBalancer balancer = new StochasticLoadBalancer() { @Override protected boolean needsBalance(ClusterLoadState cs) { return true; } }; balancer.setConf(conf); balancer.setClusterStatus(admin.getClusterStatus()); List<RegionPlan> regionPlanList = balancer.balanceCluster(clusterState); return regionPlanList == null ? new ArrayList<RegionPlan>() : regionPlanList; }
Example 4
Source File: CommandAdapter.java From hbase-tools with Apache License 2.0 | 5 votes |
public static List<RegionPlan> makePlan(HBaseAdmin admin, Map<ServerName, List<HRegionInfo>> clusterState, Configuration conf) throws IOException { StochasticLoadBalancer balancer = new StochasticLoadBalancer() { @Override protected boolean needsBalance(Cluster c) { return true; } }; balancer.setConf(conf); balancer.setClusterStatus(admin.getClusterStatus()); List<RegionPlan> regionPlanList = balancer.balanceCluster(clusterState); return regionPlanList == null ? new ArrayList<RegionPlan>() : regionPlanList; }