hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ramkrishna.s.vasudevan (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-5737) Minor Improvements related to balancer.
Date Tue, 10 Apr 2012 18:07:13 GMT

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

ramkrishna.s.vasudevan commented on HBASE-5737:

Thanks for your review.  
If you see the code base where we deal with the regions assignment like the 
  private final NavigableMap<ServerName, Set<HRegionInfo>> servers =
    new TreeMap<ServerName, Set<HRegionInfo>>();
  private final SortedMap<HRegionInfo, ServerName> regions =
    new TreeMap<HRegionInfo, ServerName>();
We use treemap.  Here in getAssignmentsByTable we try to give the table to region, server
The places where we do rebuildUserRegions also we try to maintain the order as retrieved from
the meta.
Here also we try to iterate the 'servers' tree map and form the result.  Hence i felt using
a tree map will maintain some consistency.
And for some real world scenario, if i have a pair of tables may be named TableA and TableA_xxxx
then when i want to do a balancing for these two tables thro an extended balancer there is
a chance that TableA_xxxx comes first and then TableA.  But this use case is very specific.

> Minor Improvements related to balancer.
> ---------------------------------------
>                 Key: HBASE-5737
>                 URL: https://issues.apache.org/jira/browse/HBASE-5737
>             Project: HBase
>          Issue Type: Improvement
>          Components: master
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>            Priority: Minor
>         Attachments: HBASE-5737.patch
> Currently in Am.getAssignmentByTable()  we use a result map which is currenly a hashmap.
 It could be better if we have a treeMap.  Even in MetaReader.fullScan we have the treeMap
only so that we have the naming order maintained. I felt this change could be very useful
in cases where we are extending the DefaultLoadBalancer.  

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


View raw message