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 D7409D34A for ; Mon, 30 Jul 2012 03:15:36 +0000 (UTC) Received: (qmail 66865 invoked by uid 500); 30 Jul 2012 03:15:36 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 66814 invoked by uid 500); 30 Jul 2012 03:15: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 66600 invoked by uid 99); 30 Jul 2012 03:15:36 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2012 03:15:36 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 33D8C142823 for ; Mon, 30 Jul 2012 03:15:36 +0000 (UTC) Date: Mon, 30 Jul 2012 03:15:36 +0000 (UTC) From: "zhou wenjian (JIRA)" To: issues@hbase.apache.org Message-ID: <1608092135.115091.1343618136215.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1683270434.105268.1343293114609.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (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:comment-tabpanel&focusedCommentId=13424675#comment-13424675 ] zhou wenjian commented on HBASE-6459: ------------------------------------- we have test the patch 90 in our test cluster (5rs,3u3) create 2000 regions before: 80s+ after: in 10s > improve speed of create table > ----------------------------- > > Key: HBASE-6459 > URL: https://issues.apache.org/jira/browse/HBASE-6459 > Project: HBase > Issue Type: Bug > Affects Versions: 0.94.0 > Reporter: zhou wenjian > Fix For: 0.94.1 > > Attachments: HBASE-6459-90.patch, HBASE-6459-92.patch, HBASE-6459-94.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