hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Gray (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-1909) Balancer assigns to most loaded server when assigning a single region
Date Thu, 15 Oct 2009 20:27:31 GMT

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

Jonathan Gray commented on HBASE-1909:

There is a very misleading comment:

    int nRegionsToAssign = regionsToAssign.size();
    // Now many regions to assign this server.
    int nregions = regionsPerServer(nRegionsToAssign, thisServersLoad);

In reality, what's returned by regionsPerServer is the number of regions that should be assigned
to less-loaded servers (javadoc of that method is right)

    if (nRegionsToAssign <= nregions) {
      // I do not know whats supposed to happen in this case.  Assign one.
      LOG.debug("Assigning one region only (playing it safe..)");
      assignRegions(regionsToAssign, 1, info, returnMsgs);
    } else {
      nRegionsToAssign -= nregions;
      if (nRegionsToAssign > 0 || isMetaAssign) {

HBASE-1868 made it so if nRegionsToAssign <= nregions, we just assign one.  This was to
prevent conditions where we didn't assign and a region got left in the abyss.

Need to study what was happening in HBASE-1868...

> Balancer assigns to most loaded server when assigning a single region
> ---------------------------------------------------------------------
>                 Key: HBASE-1909
>                 URL: https://issues.apache.org/jira/browse/HBASE-1909
>             Project: Hadoop HBase
>          Issue Type: Bug
>    Affects Versions: 0.20.1
>            Reporter: Jonathan Gray
>         Attachments: unbalanced.txt
> fake on irc found a bug where he truncated his tables and they all ended up getting assigned
to the same regionserver.
> 4 total nodes, root and meta each ended up on one node, another node had 0 regions, and
the final one ended up with all 5 regions of user tables.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message