You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org> on 2011/04/05 07:03:05 UTC

[jira] [Created] (HBASE-3734) HBaseAdmin creates new configurations in getCatalogTracker

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

[jira] [Updated] (HBASE-3734) HBaseAdmin creates new configurations in getCatalogTracker

Posted by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Daniel Cryans updated HBASE-3734:
--------------------------------------

    Attachment: HBASE-3734.patch

Patch that adds the copy in HBA's constructor and removes the copy in getCatalogTracker, passes unit tests.

> 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
>
>         Attachments: HBASE-3734.patch
>
>
> 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

[jira] [Commented] (HBASE-3734) HBaseAdmin creates new configurations in getCatalogTracker

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13017198#comment-13017198 ] 

stack commented on HBASE-3734:
------------------------------

+1 Lets go w/ this.

> 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
>            Assignee: Jean-Daniel Cryans
>             Fix For: 0.90.3
>
>         Attachments: HBASE-3734-v2.patch, HBASE-3734.patch
>
>
> 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

[jira] [Updated] (HBASE-3734) HBaseAdmin creates new configurations in getCatalogTracker

Posted by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Daniel Cryans updated HBASE-3734:
--------------------------------------

    Attachment: HBASE-3734-v2.patch

Patch that fixes the places where it wasn't cleaning the CT, also I still do the configuration copy in the constructor to be safer.

> 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
>            Assignee: Jean-Daniel Cryans
>             Fix For: 0.90.3
>
>         Attachments: HBASE-3734-v2.patch, HBASE-3734.patch
>
>
> 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

[jira] [Commented] (HBASE-3734) HBaseAdmin creates new configurations in getCatalogTracker

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
    [ 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

[jira] [Commented] (HBASE-3734) HBaseAdmin creates new configurations in getCatalogTracker

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13016687#comment-13016687 ] 

stack commented on HBASE-3734:
------------------------------

Is this the right way to go?  The javadoc on #getCatalogTracker says:

bq. @return A new CatalogTracker instance; call {@link #cleanupCatalogTracker(CatalogTracker)} to cleanup the returned catalog tracker.

Is the problem that cleanupCatalogTracker is not being called?

> 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
>            Assignee: Jean-Daniel Cryans
>             Fix For: 0.90.3
>
>         Attachments: HBASE-3734.patch
>
>
> 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

[jira] [Commented] (HBASE-3734) HBaseAdmin creates new configurations in getCatalogTracker

Posted by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13016199#comment-13016199 ] 

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

The main concern is that different components in the same JVM have different connections, so a closed client connection doesn't also close a region server connection (like in most tests). The HBaseAdmin constructor should just copy the configuration upfront.

> 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

[jira] [Commented] (HBASE-3734) HBaseAdmin creates new configurations in getCatalogTracker

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018776#comment-13018776 ] 

Hudson commented on HBASE-3734:
-------------------------------

Integrated in HBase-TRUNK #1846 (See [https://hudson.apache.org/hudson/job/HBase-TRUNK/1846/])
    

> 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
>            Assignee: Jean-Daniel Cryans
>             Fix For: 0.90.3
>
>         Attachments: HBASE-3734-v2.patch, HBASE-3734.patch
>
>
> 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

[jira] [Resolved] (HBASE-3734) HBaseAdmin creates new configurations in getCatalogTracker

Posted by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Daniel Cryans resolved HBASE-3734.
---------------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]

Committed to branch and trunk, thanks for the reviews Stack!

> 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
>            Assignee: Jean-Daniel Cryans
>             Fix For: 0.90.3
>
>         Attachments: HBASE-3734-v2.patch, HBASE-3734.patch
>
>
> 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

[jira] [Assigned] (HBASE-3734) HBaseAdmin creates new configurations in getCatalogTracker

Posted by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Daniel Cryans reassigned HBASE-3734:
-----------------------------------------

    Assignee: Jean-Daniel Cryans

> 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
>            Assignee: Jean-Daniel Cryans
>             Fix For: 0.90.3
>
>         Attachments: HBASE-3734.patch
>
>
> 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