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 EF0EA17F88 for ; Thu, 12 Feb 2015 16:43:16 +0000 (UTC) Received: (qmail 82586 invoked by uid 500); 12 Feb 2015 16:43:11 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 82537 invoked by uid 500); 12 Feb 2015 16:43:11 -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 82525 invoked by uid 99); 12 Feb 2015 16:43:11 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Feb 2015 16:43:11 +0000 Date: Thu, 12 Feb 2015 16:43:11 +0000 (UTC) From: "Hudson (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-13026) Wrong error message in case incorrect snapshot name OR Incorrect table name 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-13026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14318515#comment-14318515 ] Hudson commented on HBASE-13026: -------------------------------- FAILURE: Integrated in HBase-1.1 #171 (See [https://builds.apache.org/job/HBase-1.1/171/]) HBASE-13026: Wrong error message in case incorrect snapshot name OR Incorrect table name (matteo.bertozzi: rev 38de2d227644eaa2818019ec3a216b9ec10d9b1d) * hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java > Wrong error message in case incorrect snapshot name OR Incorrect table name > --------------------------------------------------------------------------- > > Key: HBASE-13026 > URL: https://issues.apache.org/jira/browse/HBASE-13026 > Project: HBase > Issue Type: Bug > Affects Versions: 2.0.0 > Reporter: Bhupendra Kumar Jain > Priority: Minor > Fix For: 1.0.0, 2.0.0, 0.98.11 > > Attachments: 0001-HBASE-13026-Wrong-error-message-in-case-incorrect-sn.patch > > > hbase(main):009:0> snapshot 't1', '.t1Snapshot' > ERROR: Illegal first character <46> at 0. {color:red}*Namespaces*{color} can only start with alphanumeric characters': i.e. [a-zA-Z_0-9]: t1Snapshot > hbase(main):008:0> create '-test' , 'cf1' > ERROR: Illegal first character <45> at 0.{color:red}*Namespaces*{color} can only start with alphanumeric characters': i.e. [a-zA-Z_0-9]: -test > >> As per message "Namespaces" is wrong. But in this scenario, snapshot / table name start character is wrong. > Its because in the code the message is as below > {code} > if (qualifierName[start] == '.' || qualifierName[start] == '-') { > throw new IllegalArgumentException("Illegal first character <" + qualifierName[0] + > "> at 0. Namespaces can only start with alphanumeric " + > "characters': i.e. [a-zA-Z_0-9]: " + > Bytes.toString(qualifierName)); > {code} > The correct code should be as below > {code} > if (qualifierName[start] == '.' || qualifierName[start] == '-') { > throw new IllegalArgumentException("Illegal first character <" + qualifierName[start] + > "> at 0. " + (isSnapshot ? "Snapshot" : "User-space table") + > " qualifiers can only start with 'alphanumeric " + > "characters': i.e. [a-zA-Z_0-9]: " + > Bytes.toString(qualifierName, start, end)); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)