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

Ted Yu commented on HBASE-13965:
--------------------------------

{code}
32        public void updateStochasticCost(String tableName, String 
costFunctionName,
{code}
Should tableName parameter be of type TableName ?

For MetricsStochasticBalancerSourceImpl.java , it should be annotated with 
@InterfaceAudience.Private
{code}
56         * The function that report stochastic load balancer costs to JMX
{code}
'that report' -> 'that reports'
{code}
58        public void updateStochasticCost(String tableName, String 
costFunctionName,
59            String costFunctionDesc, Double value) {
{code}
costFunctionDesc isn't used in the method.
{code}
82                String attrName = tableName + ((tableName.length() <= 0) ? "" 
: TABLE_FUNCTION_SEP) + key;
{code}
When would tableName.length() be <= 0 ? There is check at the beginning of 
updateStochasticCost().
{code}
124       private Double[] lastSubcosts;
{code}
nit: Uppercase 'c' of 'costs'
{code}
470           this.lastSubcosts[i] = multiplier*cost;
471           total += multiplier * cost;
{code}
There is no need to perform the same multiplication twice.

> Stochastic Load Balancer JMX Metrics
> ------------------------------------
>
>                 Key: HBASE-13965
>                 URL: https://issues.apache.org/jira/browse/HBASE-13965
>             Project: HBase
>          Issue Type: Improvement
>          Components: Balancer, metrics
>            Reporter: Lei Chen
>            Assignee: Lei Chen
>         Attachments: HBASE-13965-v3.patch, HBASE-13965_v2.patch, 
> HBase-13965-v1.patch, stochasticloadbalancerclasses_v2.png
>
>
> Today’s default HBase load balancer (the Stochastic load balancer) is cost 
> function based. The cost function weights are tunable but no visibility into 
> those cost function results is directly provided.
> A driving example is a cluster we have been tuning which has skewed rack size 
> (one rack has half the nodes of the other few racks). We are tuning the 
> cluster for uniform response time from all region servers with the ability to 
> tolerate a rack failure. Balancing LocalityCost, RegionReplicaRack Cost and 
> RegionCountSkew Cost is difficult without a way to attribute each cost 
> function’s contribution to overall cost. 
> What this jira proposes is to provide visibility via JMX into each cost 
> function of the stochastic load balancer, as well as the overall cost of the 
> balancing plan.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to