HTable.getMetadata is very inefficient
--------------------------------------

                 Key: HBASE-632
                 URL: https://issues.apache.org/jira/browse/HBASE-632
             Project: Hadoop HBase
          Issue Type: Improvement
          Components: client
            Reporter: Bryan Duxbury
            Priority: Minor
             Fix For: 0.2.0


The current implementation of HTable.getMetadata is very inefficient. In order 
to find the HTableDescriptor, it does a full meta scan for all table names. 
Then, it selects the one that matches the table we're looking for. That's a 
huge number of operations to satisfy a very simple question. To make matters 
worse, it doesn't even cache the result it gets - subsequent calls will go 
right back out to a meta scan.

At the very least, we should only look up the first meta row for a given take 
and do it as a random read. We should consider caching the result, or even just 
grabbing it during table creation (as we will check meta to make sure the table 
you're opening exists). Of course, if we move table descriptors out of META 
altogether (maybe into Zookeeper?) then this will have to be revisited no 
matter what.

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

Reply via email to