hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Daniel Cryans (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-423) Test cases need a mechanism to tell HConnectionManager to shutdown
Date Fri, 04 Jul 2008 14:41:34 GMT

    [ https://issues.apache.org/jira/browse/HBASE-423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610595#action_12610595
] 

Jean-Daniel Cryans commented on HBASE-423:
------------------------------------------

Isn't the call on HConnectionManager.deleteConnectionInfo() in the tearDown of HBaseClusterTestCase
enough? I tried adding a boolean called acceptingRequests in HCM that is checked like this
:

{code}
public static HConnection getConnection(HBaseConfiguration conf) {
    TableServers connection = null;
    if(acceptingRequests) {
      
      synchronized (HBASE_INSTANCES) {
        String instanceName = conf.get(HBASE_DIR);
        connection = HBASE_INSTANCES.get(instanceName);
        if (connection == null) {
          connection = new TableServers(conf);
          HBASE_INSTANCES.put(instanceName, connection);
        }
      }
    }
    return connection;
  }
{code}

and I think I saw that each tests took 1 second less. 

> Test cases need a mechanism to tell HConnectionManager to shutdown
> ------------------------------------------------------------------
>
>                 Key: HBASE-423
>                 URL: https://issues.apache.org/jira/browse/HBASE-423
>             Project: Hadoop HBase
>          Issue Type: Test
>          Components: client
>            Reporter: Jim Kellerman
>            Assignee: Jean-Daniel Cryans
>
> One of the reason many test cases take so long is that HConnectionManager continues trying
to refind tables, meta and root region even when the test is done but has not completely shut
down yet.
> The test case should be able to call the connection manager and tell it to shutdown,
meaning:
> - release all references (clear out all its maps)
> - do not accept any new requests
> - if any requests are in progress, abort them.

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


Mime
View raw message