hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mingjie Lai (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HBASE-2468) Improvements to prewarm META cache on clients
Date Fri, 21 May 2010 22:26:17 GMT

     [ https://issues.apache.org/jira/browse/HBASE-2468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Mingjie Lai updated HBASE-2468:

    Attachment: HBASE-2468-trunk.patch

Basic ideas:
1. At o.a.h.h.client.HConnectionManager.locateRegionInMeta(), prefetch certain number of table
regions in global region loc cache when scanning META, instead of only caching the desired
queried table+row region. 
2. For a fresh table load, *all* region locations of the table will be prefetched/cached.
While after initialization, each miss could fetch ahead some number of rows from META. 

Patched files:
- o.a.h.h.client.HConnectionManager: added a new method to perform META table prewarm. 
- o.a.h.h.client.MetaScanner: overloaded MetaScanner.metaScan, to support scanning meta table
within certain steps:
    public static void metaScan(HBaseConfiguration configuration,
      MetaScannerVisitor visitor, byte[] tableName, int rowLimit) 
- o.a.h.h.client.TestFromClientSide: added a test case for region cache

Potential issues:
- o.a.h.h.client.HTable constructor triggers the cache prewarm right now, by calling HConnection.locateRegion().
I was suggested to defer calling locateRegion() from HTable constructor, but some of existing
unit test cases failed because they implicitly rely on the constructor to do something, i.e.,
waiting for a table to be fully created after a table creation. 
- For 2, ``each miss could fetch ahead some number of rows'': right now, this number is hard-coded
as 10. Is it necessary to make it configurable? 

> Improvements to prewarm META cache on clients
> ---------------------------------------------
>                 Key: HBASE-2468
>                 URL: https://issues.apache.org/jira/browse/HBASE-2468
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Todd Lipcon
>            Assignee: Mingjie Lai
>             Fix For: 0.21.0
>         Attachments: HBASE-2468-trunk.patch
> A couple different use cases cause storms of reads to META during startup. For example,
a large MR job will cause each map task to hit meta since it starts with an empty cache.
> A couple possible improvements have been proposed:
>  - MR jobs could ship a copy of META for the table in the DistributedCache
>  - Clients could prewarm cache by doing a large scan of all the meta for the table instead
of random reads for each miss
>  - Each miss could fetch ahead some number of rows in META

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

View raw message