[ 
https://issues.apache.org/jira/browse/HBASE-17786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15997402#comment-15997402
 ] 

Sean Busbey commented on HBASE-17786:
-------------------------------------

{code}
+  // Non-default configurations.
+  private void setupConf() {
+    conf.setFloat("hbase.master.balancer.stochastic.maxMovePercent", 1.0f);
+    conf.setLong(StochasticLoadBalancer.MAX_STEPS_KEY, 2000000L);
+    conf.setFloat("hbase.master.balancer.stochastic.localityCost", 0);
+    conf.setLong("hbase.master.balancer.stochastic.maxRunningTime", 300 * 
1000); // 300 sec
+    conf.setFloat("hbase.master.balancer.stochastic.minCostNeedBalance", 
0.05f);
+
+    conf.setClass(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, 
loadBalancerClazz, LoadBalancer.class);
+    loadBalancer = LoadBalancerFactory.getLoadBalancer(conf);
+  }
{code}

We should only need the stochastic load balancer settings if the load balancer 
is the stochastic load balancer, I think?

Also, we should not set these values if the incoming configuration had them set 
by the user running the perf tool.

> Create LoadBalancer perf-tests (test balancer algorithm decoupled from 
> workload)
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-17786
>                 URL: https://issues.apache.org/jira/browse/HBASE-17786
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Balancer, proc-v2
>            Reporter: stack
>            Assignee: Umesh Agashe
>              Labels: beginner
>             Fix For: 2.0.0
>
>         Attachments: HBASE-17786.001.patch
>
>
> (Below is a quote from [~mbertozzi] taken from an internal issue that I'm 
> moving out here)
> Add perf tools and keep monitored balancer performance (a BalancerPE-type 
> thing).
> Most of the balancers should be instantiable without requiring a 
> mini-cluster, and it easy to create tons of RegionInfo and ServerNames with a 
> for loop.
> The balancer is just creating a map RegionInfo:ServerName.
> There are two methods to test roundRobinAssignment() and retainAssignment()
> {code}
> Map<ServerName, List<HRegionInfo>> roundRobinAssignment(
>     List<HRegionInfo> regions,
>     List<ServerName> servers
>   ) throws HBaseIOException; 
> Map<ServerName, List<HRegionInfo>> retainAssignment(
>     Map<HRegionInfo, ServerName> regions,
>     List<ServerName> servers
>   ) throws HBaseIOException;
> {code}
> There are a bunch of obvious optimization that everyone can see just by 
> looking at the code. (like replacing array with set when we do 
> contains/remove operations). It will be nice to have a baseline and start 
> improving from there.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to