Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 56AFDD8BC for ; Wed, 1 Aug 2012 03:48:41 +0000 (UTC) Received: (qmail 39741 invoked by uid 500); 1 Aug 2012 03:48:40 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 39112 invoked by uid 500); 1 Aug 2012 03:48:36 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 39076 invoked by uid 99); 1 Aug 2012 03:48:35 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Aug 2012 03:48:35 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id CF28C142861 for ; Wed, 1 Aug 2012 03:48:34 +0000 (UTC) Date: Wed, 1 Aug 2012 03:48:34 +0000 (UTC) From: "zhou wenjian (JIRA)" To: issues@hbase.apache.org Message-ID: <1878059374.124909.1343792914850.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1683270434.105268.1343293114609.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Updated] (HBASE-6459) improve speed of create table MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-6459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] zhou wenjian updated HBASE-6459: -------------------------------- Status: Patch Available (was: Open) > improve speed of create table > ----------------------------- > > Key: HBASE-6459 > URL: https://issues.apache.org/jira/browse/HBASE-6459 > Project: HBase > Issue Type: Improvement > Affects Versions: 0.94.0 > Reporter: zhou wenjian > Fix For: 0.96.0 > > Attachments: HBASE-6459-90.patch, HBASE-6459-92.patch, HBASE-6459-94.patch, HBASE-6459-trunk-v2.patch, HBASE-6459-trunk.patch > > > in CreateTableHandler > for (int regionIdx = 0; regionIdx < this.newRegions.length; regionIdx++) { > HRegionInfo newRegion = this.newRegions[regionIdx]; > // 1. Create HRegion > HRegion region = HRegion.createHRegion(newRegion, > this.fileSystemManager.getRootDir(), this.conf, > this.hTableDescriptor, null, false, true); > regionInfos.add(region.getRegionInfo()); > if (regionIdx % batchSize == 0) { > // 2. Insert into META > MetaEditor.addRegionsToMeta(this.catalogTracker, regionInfos); > regionInfos.clear(); > } > // 3. Close the new region to flush to disk. Close log file too. > region.close(); > } > All the region will be create serially. > If we have thousands of regions, that will be a huge cost. > We can improve it by create the region in parallel -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira