hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matteo Bertozzi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-13058) Hbase shell command 'scan' for non existent table shows unnecessary info for one unrelated existent table.
Date Tue, 24 Feb 2015 17:15:05 GMT

    [ https://issues.apache.org/jira/browse/HBASE-13058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14335103#comment-14335103
] 

Matteo Bertozzi commented on HBASE-13058:
-----------------------------------------

@stack I haven't checked but as mentioned in HBASE-10533, using first.arg is not correct because
as soon as you have a command that doesn't have the table as first argument you get the wrong
message (e.g. grant may throw TableNotFound and the table arg is the third).
also, why change back from {cause} to {first.arg} only on TableNotFound and not in the other
cases fixed by HBASE-10533 like the TableExistsException few lines below?
https://github.com/apache/hbase/commit/95974d97ebb112c2f4079569f10642f16451df2d

> Hbase shell command 'scan' for non existent table shows unnecessary info for one unrelated
existent table.
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-13058
>                 URL: https://issues.apache.org/jira/browse/HBASE-13058
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>            Reporter: Abhishek Kumar
>            Priority: Trivial
>             Fix For: 2.0.0, 1.1.0
>
>         Attachments: 0001-HBASE-13058-Error-messages-in-scan-table.patch, 0001-HBASE-13058-shell-unknown-table-message-update.patch
>
>
> When scanning for a non existent table in hbase shell, error message in shell  sometimes(based
on META table content) displays completely unrelated table info , which seems to be unnecessary
and inconsistent with other error messages:
> {noformat}
> hbase(main):016:0> scan 'noTable'
> ROW                                              COLUMN+CELL
> ERROR: Unknown table Table 'noTable' was not found, got: hbase:namespace.!
> ---------------------------------------------------------------------------------------------
> hbase(main):017:0> scan '01_noTable'
> ROW                                              COLUMN+CELL
> ERROR: Unknown table 01_noTable!
> --------------------------------------------------
> {noformat}
> Its happening when doing a META table scan (to locate input table ) and scanner stops
at row of another table (beyond which table can not exist) in ConnectionManager.locateRegionInMeta:
> {noformat}
> private RegionLocations locateRegionInMeta(TableName tableName, byte[] row,
>                    boolean useCache, boolean retry, int replicaId) throws IOException
{
> .................................
> ................................
> // possible we got a region of a different table...
>           if (!regionInfo.getTable().equals(tableName)) {
>             throw new TableNotFoundException(
>                   "Table '" + tableName + "' was not found, got: " +
>                   regionInfo.getTable() + ".");
>           }
> ...............................
> ...............................
> {noformat}
> Here, we can simply put a debug message(if required) and just throw the TableNotFoundException(tableName)
 with only tableName instead of with scanner positioned row.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message