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 C88959971 for ; Fri, 24 Feb 2012 19:58:12 +0000 (UTC) Received: (qmail 65512 invoked by uid 500); 24 Feb 2012 19:58:12 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 65478 invoked by uid 500); 24 Feb 2012 19:58:12 -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 65469 invoked by uid 99); 24 Feb 2012 19:58:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 19:58:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 19:58:09 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id AB2B8339AA1 for ; Fri, 24 Feb 2012 19:57:48 +0000 (UTC) Date: Fri, 24 Feb 2012 19:57:48 +0000 (UTC) From: "Gregory Chanan (Updated) (JIRA)" To: issues@hbase.apache.org Message-ID: <419234223.16472.1330113468702.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1067112743.11552.1328660101181.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HBASE-5351) hbase completebulkload to a new table fails in a race MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-5351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gregory Chanan updated HBASE-5351: ---------------------------------- Attachment: HBASE-5351-v1.patch *attached HBASE-5351-v1.patch @Adrian and stack: Agreed, I was just trying to make a minimal change. New patch as suggested. > hbase completebulkload to a new table fails in a race > ----------------------------------------------------- > > Key: HBASE-5351 > URL: https://issues.apache.org/jira/browse/HBASE-5351 > Project: HBase > Issue Type: Bug > Components: mapreduce > Affects Versions: 0.92.0, 0.94.0 > Reporter: Gregory Chanan > Assignee: Gregory Chanan > Attachments: HBASE-5351-v1.patch, HBASE-5351.patch > > > I have a test that tests vanilla use of importtsv with importtsv.bulk.output option followed by completebulkload to a new table. > This sometimes fails as follows: > 11/12/19 15:02:39 WARN client.HConnectionManager$HConnectionImplementation: Encountered problems when prefetch META table: > org.apache.hadoop.hbase.TableNotFoundException: Cannot find row in .META. for table: ml_items_copy, row=ml_items_copy,,99999999999999 > at org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:157) > at org.apache.hadoop.hbase.client.MetaScanner.access$000(MetaScanner.java:52) > at org.apache.hadoop.hbase.client.MetaScanner$1.connect(MetaScanner.java:130) > at org.apache.hadoop.hbase.client.MetaScanner$1.connect(MetaScanner.java:127) > at org.apache.hadoop.hbase.client.HConnectionManager.execute(HConnectionManager.java:359) > at org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:127) > at org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:103) > at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.prefetchRegionCache(HConnectionManager.java:875) > at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:929) > at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:817) > at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:781) > at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:247) > at org.apache.hadoop.hbase.client.HTable.(HTable.java:211) > at org.apache.hadoop.hbase.client.HTable.(HTable.java:171) > at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles.createTable(LoadIncrementalHFiles.java:673) > at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles.run(LoadIncrementalHFiles.java:697) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:69) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:83) > at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles.main(LoadIncrementalHFiles.java:707) > The race appears to be calling HbAdmin.createTableAsync(htd, keys) and then creating an HTable object before that call has actually completed. > The following change to /src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java appears to fix the problem, but I have not been able to reproduce the race reliably, in order to write a test. > {code} > - HTable table = new HTable(this.cfg, tableName); > - > - HConnection conn = table.getConnection(); > int ctr = 0; > - while (!conn.isTableAvailable(table.getTableName()) && (ctr + while (!this.hbAdmin.isTableAvailable(tableName) && (ctr {code} -- 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