[
https://issues.apache.org/jira/browse/HBASE-2974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
stack resolved HBASE-2974.
--------------------------
Fix Version/s: 0.90.0
Resolution: Fixed
Committed small fix to TRUNK
> LoadBalancer ArithmeticException: / by zero
> -------------------------------------------
>
> Key: HBASE-2974
> URL: https://issues.apache.org/jira/browse/HBASE-2974
> Project: HBase
> Issue Type: Bug
> Reporter: stack
> Assignee: stack
> Fix For: 0.90.0
>
>
> Having an issue so regionservers are not checking in. Balancer meantime went
> to run and threw ArithmeticException: / by zero
> Committing this:
> {code}
> Index: src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java
> ===================================================================
> --- src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java
> (revision 995307)
> +++ src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java
> (working copy)
> @@ -140,6 +140,10 @@
> new TreeMap<HServerInfo,List<HRegionInfo>>(
> new HServerInfo.LoadComparator());
> int numServers = clusterState.size();
> + if (numServers == 0) {
> + LOG.debug("numServers=0 so nothing to balance");
> + return null;
> + }
> int numRegions = 0;
> // Iterate so we can count regions as we build the map
> for(Map.Entry<HServerInfo, List<HRegionInfo>> server :
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.