You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Zhihong Yu (JIRA)" <ji...@apache.org> on 2012/05/09 23:27:52 UTC

[jira] [Commented] (HBASE-5959) Add other load balancers

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

Zhihong Yu commented on HBASE-5959:
-----------------------------------

For this feature, design document showing the origin of Stochastic approach would help reviewers understand better.

{code}
+class BalanceInfo {
+
+  private final int nextRegionForUnload;
{code}
Please what the integer represents.
{code}
+public abstract class BaseLoadBalancer implements LoadBalancer {
{code}
Please add javadoc for the above class.
{code}
+  protected HTableDescriptor getTableDescriptor(byte[] tableName) throws IOException {
{code}
Why would the above method reside in BaseLoadBalancer ?
StochasticLoadBalancer, it starts to get interesting.
{code}
+    // Perform a stocastic walk to see if we can get a
{code}
Please finish the above comment.
{code}
+        if (lRegion != null) {
+          rightRegionList.add(lRegion);
+        }
+
+        double newCost = computerCost(initialRegionMapping, clusterState);
{code}
computerCost() should be named computeCost(). How would the above call utilize rightRegionList ?
{code}
+        if (newCost < currentCost || RANDOM.nextFloat() < 0.01) {
+          currentCost = newCost;
+        } else {
{code}
What if newCost is much worse than currentCost but we choose it due to RANDOM.nextFloat() < 0.01 ?
{code}
+    double skewCost = computeSkewLoadCost(clusterState);
+    return moveCost + (100 * skewCost);
{code}
Why would skewCost carry such a big weight ?

Please add test for StochasticLoadBalancer.
                
> Add other load balancers
> ------------------------
>
>                 Key: HBASE-5959
>                 URL: https://issues.apache.org/jira/browse/HBASE-5959
>             Project: HBase
>          Issue Type: New Feature
>          Components: master
>            Reporter: Elliott Clark
>            Assignee: Elliott Clark
>         Attachments: HBASE-5959-0.patch
>
>
> Now that balancers are pluggable we should give some options.b

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira