You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Enis Soztutar (JIRA)" <ji...@apache.org> on 2014/07/02 20:03:25 UTC
[jira] [Commented] (HBASE-11064) Odd behaviors of TableName for
empty namespace
[ https://issues.apache.org/jira/browse/HBASE-11064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14050490#comment-14050490 ]
Enis Soztutar commented on HBASE-11064:
---------------------------------------
Do you mind adding a couple of simple unit tests to TestTableName as well. Thanks.
> Odd behaviors of TableName for empty namespace
> ----------------------------------------------
>
> Key: HBASE-11064
> URL: https://issues.apache.org/jira/browse/HBASE-11064
> Project: HBase
> Issue Type: Bug
> Affects Versions: 0.98.3
> Reporter: Hiroshi Ikeda
> Assignee: Rekha Joshi
> Priority: Trivial
> Fix For: 0.99.0, 1.0.0, 0.98.4
>
> Attachments: HBASE-11064.1.patch
>
>
> In the class TableName,
> {code}
> public static byte [] isLegalFullyQualifiedTableName(final byte[] tableName) {
> ...
> int namespaceDelimIndex = ...
> if (namespaceDelimIndex == 0 || namespaceDelimIndex == -1){
> isLegalTableQualifierName(tableName);
> } else {
> ...
> {code}
> That means, for example, giving ":a" as the argument throws an exception which says invalid qualifier, instead of invalid namespace.
> Also, TableName.valueOf(String) and valueOf(byte[]) can create an instance with empty namespace, which is inconsistent.
--
This message was sent by Atlassian JIRA
(v6.2#6252)