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

Ted Yu commented on HBASE-3734:
-------------------------------

HBaseAdmin.getCatalogTracker() calls HConnectionManager.getConnection() which 
uses Configuration as key in HBASE_INSTANCES.
Since we want to reuse connection to the same cluster, maybe we can do this:
{code}
      connection = HBASE_INSTANCES.get(conf.get("hbase.zookeeper.quorum"));
      if (connection == null) {
        connection = new HConnectionImplementation(conf);
        HBASE_INSTANCES.put(conf.get("hbase.zookeeper.quorum"), connection);
      }
{code}
Of course, the above would break deleteConnection() which requires reference 
counting.
So maybe we can use a wrapper for (refcount, connection) tuple and store the 
wrapper object as value in HBASE_INSTANCES ?

> HBaseAdmin creates new configurations in getCatalogTracker
> ----------------------------------------------------------
>
>                 Key: HBASE-3734
>                 URL: https://issues.apache.org/jira/browse/HBASE-3734
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.90.1
>            Reporter: Jean-Daniel Cryans
>             Fix For: 0.90.3
>
>
> HBaseAdmin.getCatalogTracker creates new Configuration every time it's 
> called, instead HBA should reuse the same one and do the copy inside the 
> constructor.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to