hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhihong Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-5959) Add other load balancers
Date Sat, 12 May 2012 16:24:48 GMT

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

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

For computeTableSkewLoadCost(), normally we use region count (per table) for region servers
to judge skew.
I feel the skew in table count is not a good indicator.
{code}
+   * @return Cost of imbalance in table.
{code}
'table' -> 'tables'
{code}
+    for (Entry<ServerName, List<HRegionInfo>> entry : clusterState.entrySet())
{
+      Set<String> tablesOnRegionServer = new HashSet<String>();
{code}
We can clear the HashSet after the following line in the loop (instead of creating HashSet
every iteration):
{code}
+      tablesPerServer.add(new Double(tablesOnRegionServer.size()));
{code}
Math.abs() is not needed in the following:
{code}
+      skewCost += Math.abs(numTables - count.doubleValue());
{code}
For computeDataLocalityCost():
{code}
+        // If we can't find where the data is getTopBlock returns null.
+        // so count that as being the best possible.
+        if (dataOnServers == null) {
{code}
I think worst should be assumed if block locations cannot be retrieved.

I asked the coefficients of various costs to be configurable. This is because users tend to
give high priority to locality cost component.

BalancerTestBase.java is missing license.
{code}
+ * Class used to be the base of unit tests on load balancers. It gives helper
{code}
'Class used to be the base' -> 'Base class'.
assertClusterAsBalanced() should be package-private.

For reconcile(),
{code}
+   * This assumes the RegionPlan HSI instances are the same ones in the map, so
+   * actually no need to even pass in the map, but I think it's clearer.
{code}
Please expand HSI to full class name. The two parameters are both Lists. Where is the map
? I think it is Map<ServerName, ServerAndLoad> map.
Please describe what this method does.

                
> Add other load balancers
> ------------------------
>
>                 Key: HBASE-5959
>                 URL: https://issues.apache.org/jira/browse/HBASE-5959
>             Project: HBase
>          Issue Type: New Feature
>          Components: master
>    Affects Versions: 0.96.0
>            Reporter: Elliott Clark
>            Assignee: Elliott Clark
>         Attachments: HBASE-5959-0.patch, HBASE-5959-1.patch, HBASE-5959-2.patch, HBASE-5959-3.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

        

Mime
View raw message