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

stack commented on HBASE-4010:
------------------------------

Seems to be a copy/paste prob. with javadoc (You copy from another method but 
do not amend this new methods javadoc -- or amend the old if this is the method 
used by 'bootstrap code in the HMaster constructor'

Why does this new method in HRegion pass in an hlog instance but not use it?

Should we make it so you can pass a null hlog so when doing these bulk creates, 
we don't bother with the hlog open/close/edit especially when its not necessary.

In fact this new method createHRegion looks exactly same as existing method?

The addRegionsToMeta looks like nice addition.

Don't hardcode this: +    final int batchSize = 100;  Make it final int 
batchSize = this.conf.getInt("hbase.master.tablecreate.batchsize", 100);

As soon as you commit it, someone else will want to change it (smile).

Patch looks good otherwise.

> HMaster.createTable could be heavily optimized
> ----------------------------------------------
>
>                 Key: HBASE-4010
>                 URL: https://issues.apache.org/jira/browse/HBASE-4010
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.90.3
>            Reporter: Jean-Daniel Cryans
>            Assignee: Ted Yu
>             Fix For: 0.92.0
>
>         Attachments: 4010-v2.txt, 4010-v3.txt, 4010-v4.txt
>
>
> Looking at the createTable method in HMaster (the one that's private), we 
> seem to be very inefficient:
>  - We set the enabled flag for the table for every region (should be done 
> only once).
>  - Every time we create a new region we create a new HLog and then close it 
> (reuse one instead or see if it's really necessary).
>  - We do one RPC to .META. per region (we should batch put).
> This should provide drastic speedups even for those creating tables with just 
> 50 regions.

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

        

Reply via email to