You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jonathan Gray (JIRA)" <ji...@apache.org> on 2010/07/21 01:21:50 UTC
[jira] Created: (HBASE-2857) HBaseAdmin.tableExists() should not
require a full meta scan
HBaseAdmin.tableExists() should not require a full meta scan
------------------------------------------------------------
Key: HBASE-2857
URL: https://issues.apache.org/jira/browse/HBASE-2857
Project: HBase
Issue Type: Improvement
Reporter: Jonathan Gray
Fix For: 0.90.0
HBaseAdmin.tableExists() actually makes a call to HBaseAdmin.listTables() and then checks if the table you are looking for is in the list.
listTables() uses a MetaScanner/MetaVisitor, thus requiring an entire META table scan.
We should not require a full META scan to check for the existence of a single table.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-2857) HBaseAdmin.tableExists() should not
require a full meta scan
Posted by "Jonathan Gray (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890496#action_12890496 ]
Jonathan Gray commented on HBASE-2857:
--------------------------------------
Also, I thought listTables() was implemented as it was so that it wouldn't require the master.
However, the code actually does a check for a master at the beginning, unnecessarily. Should also take that out or change the implementation of listTables().
> HBaseAdmin.tableExists() should not require a full meta scan
> ------------------------------------------------------------
>
> Key: HBASE-2857
> URL: https://issues.apache.org/jira/browse/HBASE-2857
> Project: HBase
> Issue Type: Improvement
> Reporter: Jonathan Gray
> Fix For: 0.90.0
>
>
> HBaseAdmin.tableExists() actually makes a call to HBaseAdmin.listTables() and then checks if the table you are looking for is in the list.
> listTables() uses a MetaScanner/MetaVisitor, thus requiring an entire META table scan.
> We should not require a full META scan to check for the existence of a single table.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-2857) HBaseAdmin.tableExists() should not
require a full meta scan
Posted by "stack (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12905254#action_12905254 ]
stack commented on HBASE-2857:
------------------------------
There are tests for listTable and tableExists in TestAdmin. They pass. Going to commit.
> HBaseAdmin.tableExists() should not require a full meta scan
> ------------------------------------------------------------
>
> Key: HBASE-2857
> URL: https://issues.apache.org/jira/browse/HBASE-2857
> Project: HBase
> Issue Type: Improvement
> Reporter: Jonathan Gray
> Fix For: 0.90.0
>
> Attachments: 2857.txt
>
>
> HBaseAdmin.tableExists() actually makes a call to HBaseAdmin.listTables() and then checks if the table you are looking for is in the list.
> listTables() uses a MetaScanner/MetaVisitor, thus requiring an entire META table scan.
> We should not require a full META scan to check for the existence of a single table.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HBASE-2857) HBaseAdmin.tableExists() should not
require a full meta scan
Posted by "stack (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
stack resolved HBASE-2857.
--------------------------
Assignee: stack
Resolution: Fixed
Committed attached small patch.
> HBaseAdmin.tableExists() should not require a full meta scan
> ------------------------------------------------------------
>
> Key: HBASE-2857
> URL: https://issues.apache.org/jira/browse/HBASE-2857
> Project: HBase
> Issue Type: Improvement
> Reporter: Jonathan Gray
> Assignee: stack
> Fix For: 0.90.0
>
> Attachments: 2857.txt
>
>
> HBaseAdmin.tableExists() actually makes a call to HBaseAdmin.listTables() and then checks if the table you are looking for is in the list.
> listTables() uses a MetaScanner/MetaVisitor, thus requiring an entire META table scan.
> We should not require a full META scan to check for the existence of a single table.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HBASE-2857) HBaseAdmin.tableExists() should not
require a full meta scan
Posted by "stack (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
stack updated HBASE-2857:
-------------------------
Attachment: 2857.txt
Removed the getMaster's before listTable and tableExists. Since hbase-2692, admin now carries a catalogmanager so use its tableExists instead -- it just looks for first region in a table and if exists concludes table exists.
> HBaseAdmin.tableExists() should not require a full meta scan
> ------------------------------------------------------------
>
> Key: HBASE-2857
> URL: https://issues.apache.org/jira/browse/HBASE-2857
> Project: HBase
> Issue Type: Improvement
> Reporter: Jonathan Gray
> Fix For: 0.90.0
>
> Attachments: 2857.txt
>
>
> HBaseAdmin.tableExists() actually makes a call to HBaseAdmin.listTables() and then checks if the table you are looking for is in the list.
> listTables() uses a MetaScanner/MetaVisitor, thus requiring an entire META table scan.
> We should not require a full META scan to check for the existence of a single table.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.