hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: Possible bookkeeping error in BaseLoadBalancer
Date Wed, 15 Feb 2017 22:58:31 GMT
In master branch, I see this:

      if (numRegionsPerServerPerTable[newServer][tableIndex] >
numMaxRegionsPerTable[tableIndex]) {

        numRegionsPerServerPerTable[newServer][tableIndex] =
numMaxRegionsPerTable[tableIndex];

which branch are you looking at ?

Thanks

On Wed, Feb 15, 2017 at 2:47 PM, Timothy Brown <tim@siftscience.com> wrote:

> Hi,
>
> I was wondering if someone could confirm or deny my suspicion that the
> "numMaxRegionsPerTable" is not being updated properly at line 670 of
> BaseLoadBalancer.java
> <https://github.com/apache/hbase/blob/master/hbase-
> server/src/main/java/org/apache/hadoop/hbase/master/
> balancer/BaseLoadBalancer.java>.
> The comment says "check whether this caused maxRegionsPerTable in the new
> Server to be updated" but then does not update numMaxRegionsPerTable. I
> stepped through 'testRegionAvailabilityWithRegionMoves' in
> TestBaseLoadBalancer.java and saw the maxRegionsPerTable never gets
> increased to 2 after the region is moved to a RegionServer that already has
> a region. If the maxRegionsPerTable isn't updated with the new max, then
> the balancer will properly penalize this potential move which causes a
> worse Table Skew.
>
>
> Code in question:
>
> //check whether this caused maxRegionsPerTable in the new Server to be
> updated
> if (numRegionsPerServerPerTable[newServer][tableIndex] >
> numMaxRegionsPerTable[tableIndex]) {
>   numMaxRegionsPerTable[tableIndex] =
> numRegionsPerServerPerTable[newServer][tableIndex];
> }
>
>
> Thanks,
> Tim
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message