hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [2/4] hbase git commit: HBASE-13026: Wrong error message in case incorrect snapshot name OR Incorrect table name
Date Thu, 12 Feb 2015 14:44:36 GMT
HBASE-13026: Wrong error message in case incorrect snapshot name OR Incorrect table name

Signed-off-by: Matteo Bertozzi <matteo.bertozzi@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/38de2d22
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/38de2d22
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/38de2d22

Branch: refs/heads/branch-1
Commit: 38de2d227644eaa2818019ec3a216b9ec10d9b1d
Parents: aca9aac
Author: Bhupendra <bhupendra.jain@huawei.com>
Authored: Thu Feb 12 15:36:07 2015 +0530
Committer: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Committed: Thu Feb 12 15:30:29 2015 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/TableName.java    | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/38de2d22/hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java
index 802319e..9925d2c 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java
@@ -180,10 +180,11 @@ public final class TableName implements Comparable<TableName>
{
     }
 
     if (qualifierName[start] == '.' || qualifierName[start] == '-') {
-      throw new IllegalArgumentException("Illegal first character <" + qualifierName[0]
+
-                                         "> at 0. Namespaces can only start with alphanumeric
" +
+      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));
+                                         Bytes.toString(qualifierName, start, end));
     }
     for (int i = start; i < end; i++) {
       if (Character.isLetterOrDigit(qualifierName[i]) ||
@@ -194,7 +195,7 @@ public final class TableName implements Comparable<TableName> {
       }
       throw new IllegalArgumentException("Illegal character code:" + qualifierName[i] +
                                          ", <" + (char) qualifierName[i] + "> at "
+ i +
-                                         ". " + (isSnapshot ? "snapshot" : "User-space table")
+
+                                         ". " + (isSnapshot ? "Snapshot" : "User-space table")
+
                                          " qualifiers can only contain " +
                                          "'alphanumeric characters': i.e. [a-zA-Z_0-9-.]:
" +
                                          Bytes.toString(qualifierName, start, end));


Mime
View raw message