hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [1/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:35 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 a3b4cc135 -> 2fad653ff
  refs/heads/branch-1 aca9aacfb -> 38de2d227
  refs/heads/branch-1.0 a8632593b -> 497a604e4
  refs/heads/master b7f6a4580 -> 02759f2d8


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/02759f2d
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/02759f2d
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/02759f2d

Branch: refs/heads/master
Commit: 02759f2d8c58092421f6b34f3585256baaf44f9d
Parents: b7f6a45
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:25:35 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/02759f2d/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 c560a43..5167157 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