hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stack <st...@duboce.net>
Subject Re: question about RegionManager
Date Tue, 07 Sep 2010 03:53:41 GMT
Well spotted!

This issue was fixed in 0.20.5.  It was "HBASE-2167  Load balancer
falls into pathological state if one server under average - slop;
endless churn"

St.Ack


On Mon, Sep 6, 2010 at 7:06 PM, Tao Xie <xietao.mailbox@gmail.com> wrote:
> hi, all
>
> I'm reading the code of RegionManager, I find in the following method there
> is an situation when nRegionsToAssign <= nregions, the code only assigns 1
> region.
> Is this correct? Hbase version 0.20.4.
>
>  private void assignRegionsToMultipleServers(final HServerLoad
> thisServersLoad,
>    final Set<RegionState> regionsToAssign, final HServerInfo info,
>    final ArrayList<HMsg> returnMsgs) {
>    boolean isMetaAssign = false;
>    for (RegionState s : regionsToAssign) {
>      if (s.getRegionInfo().isMetaRegion())
>        isMetaAssign = true;
>    }
>    int nRegionsToAssign = regionsToAssign.size();
>    // Now many regions to assign this server.
>    int nregions = regionsPerServer(nRegionsToAssign, thisServersLoad);
>    LOG.debug("Assigning for " + info + ": total nregions to assign=" +
>      nRegionsToAssign + ", nregions to reach balance=" + nregions +
>      ", isMetaAssign=" + isMetaAssign);
>    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 {
>

Mime
View raw message