HBASE-13026: Wrong error message in case incorrect snapshot name OR Incorrect table name
Signed-off-by: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
This commit is contained in:
parent
aca9aacfb4
commit
38de2d2276
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue