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

Jonathan Hsieh commented on HBASE-6516:
---------------------------------------

The #2 suggestion is to remove the code that eats the exception in the two arg 
version and then have it throw the exception.  You'd need to inspect the places 
where that version of the method is called to make sure that the possible 
exceptions are handled properly.

{code}
 static HTableDescriptor getTableDescriptor(FileSystem fs,
      Path hbaseRootDir, String tableName) {
    HTableDescriptor htd = null;
//    try {
      htd = getTableDescriptor(fs, FSUtils.getTablePath(hbaseRootDir, 
tableName));
//    } catch (NullPointerException e) {
//      LOG.debug("Exception during readTableDecriptor. Current table name = " +
//        tableName , e);
//    } catch (IOException ioe) {
//      LOG.debug("Exception during readTableDecriptor. Current table name = " +
//        tableName , ioe);
//    }
    return htd;
  }
{code}

About the null, the method is not documented so we need to figure out what the 
right behavior is.  IMO, if the file if the .tableinfo is missing, this is 
probably an ioexception, or ideally a TableInfoMissingException extends 
HBaseIOException extends IOException.  Similarly you'd need to look where that 
method is called to make sure null is handled, and if any io exceptions are 
handled.
                
> hbck cannot detect any IOException while ".tableinfo" file is missing
> ---------------------------------------------------------------------
>
>                 Key: HBASE-6516
>                 URL: https://issues.apache.org/jira/browse/HBASE-6516
>             Project: HBase
>          Issue Type: Bug
>          Components: hbck
>    Affects Versions: 0.94.0, 0.96.0
>            Reporter: Jie Huang
>         Attachments: hbase-6516.patch, hbase-6516-v2.patch
>
>
> HBaseFsck checks those missing .tableinfo files in loadHdfsRegionInfos() 
> function. However, no IoException will be catched while .tableinfo is 
> missing, since "FSTableDescriptors.getTableDescriptor" doesn't throw any 
> IoException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to