hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-5027) HConnection.create(final Connection conf) does not clone, it creates a new Configuration reading *.xmls and then does a merge.
Date Wed, 14 Dec 2011 21:27:30 GMT

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

stack commented on HBASE-5027:
------------------------------

bq. It it possible to count the number of connection open? Then we would just have to check
that it does not increase after two calls.

If you added this:

{code}
diff --git a/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java b/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java
index 17da42d..00f4541 100644
--- a/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java
+++ b/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java
@@ -85,4 +85,13 @@ public class HConnectionTestingUtility {
       return connection;
     }
   }
-}
+
+  /**
+   * @return Count of extant connection instances
+   */
+  public static int getConnectionCount() {
+    synchronized (HConnectionManager.HBASE_INSTANCES) {
+      return HConnectionManager.HBASE_INSTANCES.size();
+    }
+  }
+}
{code}

... you could count connections.  We shouldn't open access to HCM.HBASE_INSTANCES Map.  Above
does it in a way that allows tests count instances.
                
> HConnection.create(final Connection conf) does not clone, it creates a new Configuration
reading *.xmls and then does a merge.
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-5027
>                 URL: https://issues.apache.org/jira/browse/HBASE-5027
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>
> Its more expensive that it should be; its causing TestAdmin to fail after HBASE-4417
 went in.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message