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 B2F3F10BC0 for ; Tue, 25 Nov 2014 11:40:18 +0000 (UTC) Received: (qmail 33353 invoked by uid 500); 25 Nov 2014 11:40:13 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 33298 invoked by uid 500); 25 Nov 2014 11:40:13 -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 33286 invoked by uid 99); 25 Nov 2014 11:40:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Nov 2014 11:40:13 +0000 Date: Tue, 25 Nov 2014 11:40:13 +0000 (UTC) From: "Ashish Singhi (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-10536) ImportTsv should fail fast if any of the column family passed to the job is not present in the 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-10536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14224421#comment-14224421 ] Ashish Singhi commented on HBASE-10536: --------------------------------------- minor nits {code} + for (String cf : cfSet) { + if(table.getTableDescriptor().getFamily(Bytes.toBytes(cf)) == null) { {code} Can we extract table.getTableDescriptor() this to a variable and use it instead of calling this method inside the loop ? {code} + boolean noStrict = Boolean.valueOf(conf.get(NO_STRICT_COL_FAMILY)); {code} Can we use conf.getBoolean(NO_STRICT_COL_FAMILY, false) ? {code} + for (HColumnDescriptor family : table.getTableDescriptor().getFamilies()) + familyNames.add(family.getNameAsString()); {code} Can we enclose the for statement within parenthesis ? > ImportTsv should fail fast if any of the column family passed to the job is not present in the table > ---------------------------------------------------------------------------------------------------- > > Key: HBASE-10536 > URL: https://issues.apache.org/jira/browse/HBASE-10536 > Project: HBase > Issue Type: Bug > Components: mapreduce > Affects Versions: 0.98.0 > Reporter: rajeshbabu > Assignee: denny joseph > Attachments: 10536v2.txt, HBASE-10536.patch, HBASE-10536.patch, HBASE-10536.patch > > > While checking 0.98 rc, running bulkload tools. By mistake passed wrong column family to importtsv. LoadIncrementalHfiles failed with following exception > {code} > Exception in thread "main" java.io.IOException: Unmatched family names found: unmatched family names in HFiles to be bulkloaded: [f1]; valid family names of table test are: [f] > at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles.doBulkLoad(LoadIncrementalHFiles.java:241) > at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles.run(LoadIncrementalHFiles.java:823) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84) > at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles.main(LoadIncrementalHFiles.java:828) > {code} > > Its better to fail fast if any of the passed column family is not present in table. -- This message was sent by Atlassian JIRA (v6.3.4#6332)