hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tianying Chang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-7061) region balance algorithm should do "contiue" instead of "break" when calculating the underloaded server
Date Mon, 29 Oct 2012 18:38:14 GMT

     [ https://issues.apache.org/jira/browse/HBASE-7061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tianying Chang updated HBASE-7061:
----------------------------------


I feel that the bug is different from HBASE-7060, so I opened this bug seperately. But I will
put the fix in the same patch at HBASE-7060, if approved. 
                
> region balance algorithm should do "contiue" instead of "break" when calculating the
underloaded server
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-7061
>                 URL: https://issues.apache.org/jira/browse/HBASE-7061
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Tianying Chang
>            Assignee: Tianying Chang
>
> I found this issue when investigating HBASE-7060. Basically, I think  the intention of
this code below is to find all the underloaded server. By using break, it will exit earlier,
depending on where the non-overloaded server show up in the list.  "break" should be changed
to "continue". 
> Map<ServerName, Integer> underloadedServers = new HashMap<ServerName, Integer>();
> for (Map.Entry<ServerAndLoad, List<HRegionInfo>> server:
> serversByLoad.entrySet()) {
> int regionCount = server.getKey().getLoad();
> if (regionCount >= min) { break; }
> underloadedServers.put(server.getKey().getServerName(), min - regionCount);
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message