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 9B461115AC for ; Tue, 15 Apr 2014 10:44:28 +0000 (UTC) Received: (qmail 45904 invoked by uid 500); 15 Apr 2014 10:44:27 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 45448 invoked by uid 500); 15 Apr 2014 10:44:21 -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 45154 invoked by uid 99); 15 Apr 2014 10:44:18 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Apr 2014 10:44:18 +0000 Date: Tue, 15 Apr 2014 10:44:18 +0000 (UTC) From: "Hudson (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-10966) RowCounter misinterprets column names that have colons in their qualifier 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-10966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13969423#comment-13969423 ] Hudson commented on HBASE-10966: -------------------------------- SUCCESS: Integrated in HBase-0.98-on-Hadoop-1.1 #261 (See [https://builds.apache.org/job/HBase-0.98-on-Hadoop-1.1/261/]) HBASE-10966 RowCounter misinterprets column names that have colons in their qualifier (stack: rev 1587442) * /hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java * /hbase/branches/0.98/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestRowCounter.java > RowCounter misinterprets column names that have colons in their qualifier > ------------------------------------------------------------------------- > > Key: HBASE-10966 > URL: https://issues.apache.org/jira/browse/HBASE-10966 > Project: HBase > Issue Type: Bug > Affects Versions: 0.99.0 > Reporter: Alexandre Normand > Assignee: Alexandre Normand > Priority: Trivial > Fix For: 0.99.0, 0.94.19, 0.98.2, 0.96.3 > > Attachments: 10966v094.txt, HBASE-10966-1.patch > > > RowCounter allows for column names to be specify at command line: > {code} > Usage: RowCounter [options] [--range=[startKey],[endKey]] [ ...] > For performance consider the following options: > -Dhbase.client.scanner.caching=100 > -Dmapred.map.tasks.speculative.execution=false > {code} > However, the column names are parsed assuming that if there is a colon, there are only two parts to the string. In other words, it assumes {{family:qualifier}} where {{qualifier}} wouldn't contain a colon. > This came up as I was trying to do a row count on a {{kiji}} table where qualifiers typically have multiple colon-delimited components (i.e. {{B:C}} could be a qualifier in the {{B}} family). > The flaw is in this code: > {code} > String [] fields = columnName.split(":"); > if(fields.length == 1) { > scan.addFamily(Bytes.toBytes(fields[0])); > } else { > byte[] qualifier = Bytes.toBytes(fields[1]); > qualifiers.add(qualifier); > scan.addColumn(Bytes.toBytes(fields[0]), qualifier); > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)