You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Stephen Yuan Jiang (JIRA)" <ji...@apache.org> on 2016/04/12 18:28:25 UTC

[jira] [Created] (HBASE-15636) hard coded wait time out value in HBaseTestingUtility#waitUntilAllRegionsAssigned might cause test failure

Stephen Yuan Jiang created HBASE-15636:
------------------------------------------

             Summary: hard coded wait time out value in HBaseTestingUtility#waitUntilAllRegionsAssigned might cause test failure
                 Key: HBASE-15636
                 URL: https://issues.apache.org/jira/browse/HBASE-15636
             Project: HBase
          Issue Type: Bug
          Components: integration tests, test
    Affects Versions: 1.2.0, 2.0.0
            Reporter: Stephen Yuan Jiang
            Assignee: Stephen Yuan Jiang
            Priority: Minor


HBaseTestingUtility#waitUntilAllRegionsAssigned(final TableName tableName) hard coded 60 seconds wait for region assignment in a table.  This could cause flaky tests, as the caller could create table with longs of region which takes longs time; or in CM, RS unavailable could slow down assignment; or in a slow machine, IT might take long to assign regions.  

In HBaseAdmin.java, we use a configurable value to wait for the table DDLs: {{this.syncWaitTimeout = this.conf.getInt("hbase.client.sync.wait.timeout.msec", 10 * 60000); // 10min}} - we should use the config for the HBaseTestingUtility#waitUntilAllRegionsAssigned() too.

Of course, the caller could use the "public void waitUntilAllRegionsAssigned(final TableName tableName, final long timeout)"; but it requires test change (currently, no test directly calls this signature). 

{code}  
/**
   * Wait until all regions for a table in hbase:meta have a non-empty
   * info:server, up to 60 seconds. This means all regions have been deployed,
   * master has been informed and updated hbase:meta with the regions deployed
   * server.
   * @param tableName the table name
   * @throws IOException
   */
  public void waitUntilAllRegionsAssigned(final TableName tableName) throws IOException {
    waitUntilAllRegionsAssigned(tableName, 60000);
  }
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)