Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-16462

TestRSGroupsBas#testGroupBalance may hang due to uneven region distribution

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      show this fail when TestRSGroupsBase

      testGroupBalance(org.apache.hadoop.hbase.rsgroup.TestRSGroups)  Time elapsed: 309.517 sec  <<< FAILURE!
      java.lang.AssertionError: Waiting timed out after [300,000] msec
              at org.junit.Assert.fail(Assert.java:88)
              at org.apache.hadoop.hbase.Waiter.waitFor(Waiter.java:209)
              at org.apache.hadoop.hbase.Waiter.waitFor(Waiter.java:143)
              at org.apache.hadoop.hbase.HBaseTestingUtility.waitFor(HBaseTestingUtility.java:3816)
              at org.apache.hadoop.hbase.rsgroup.TestRSGroupsBase.testGroupBalance(TestRSGroupsBase.java:434)
      

      The exception may be caused by a bug.

      TestRSGroupsBase.java
          rsGroupAdmin.balanceRSGroup(newGroupName);
          TEST_UTIL.waitFor(WAIT_TIMEOUT, new Waiter.Predicate<Exception>() {
            @Override
            public boolean evaluate() throws Exception {
              for (List<String> regions : getTableServerRegionMap().get(tableName).values()) {
                if (2 != regions.size()) {
                  return false;
                }
              }
              return true;
            }
          }); 
      

      The new Group has one table and three servers, and the table has six regions.

      Beginning, all regions are located on a single server.

      After balance, regions distributed on three server, preferably each server on two region.

      However,this is not absolute. Maybe one server has one region, another server has three regions.

      So, while waiting for the results of balance, we need only determine whether the region on the server, without having to check region's number.

        Attachments

        1. HBASE-16462-v1.patch
          0.7 kB
          Guangxu Cheng
        2. HBASE-16462-v2.patch
          1.0 kB
          Guangxu Cheng
        3. HBASE-16462-v3.patch
          0.8 kB
          Guangxu Cheng

          Issue Links

            Activity

              People

              • Assignee:
                gxcheng Guangxu Cheng
                Reporter:
                gxcheng Guangxu Cheng
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: