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

Andrew Purtell edited comment on HBASE-13058 at 2/17/15 8:37 PM:
-----------------------------------------------------------------

I think the gist of Stack's comment is a shell display nit should be handled in 
the shell (Ruby) code, not by changing the exception message thrown by the 
client library. If not, well, it's the gist of my comment :-)


was (Author: apurtell):
I think the gist of Stack's comment is a shell display nit should be handled in 
the shell (Ruby) code, not by changing the exception message thrown by the 
client library. 

> 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
>         Attachments: 0001-HBASE-13058-Error-messages-in-scan-table.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)

Reply via email to