[
https://issues.apache.org/jira/browse/HBASE-6516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13446059#comment-13446059
]
Jonathan Hsieh commented on HBASE-6516:
---------------------------------------
The test is really helpful for understanding the ramifications of this.
I don't think we want hbck to bail out if .tableinfo file is missing -- it
shouldreport it as error and be allow to continue and finish without an
exception so we can report all the errors at the end. I looked at HBASE-5631,
which is closely related, and I don't see a change to it changes there.
Hm.. it wasn't clear from reading the code that we expected the IOException.
(It ends up being a TableInfoMissingException right?)
{code}
+ fs.rename(tableinfo, new Path("/.tableinfo"));
+
+ doFsck(conf, false);
/// ADD: fail("We expect an IOException");
+ } catch (IOException ioe) {
+ assertNotNull("No IOException found while .tableinfo missing", ioe);
+ } finally {
+ fs.rename(new Path("/.tableinfo"), tableinfo);
+ deleteTable(table);
{code}
----
nits (most of these I'd fix on commit):
new files (TableInfoMissingException) require an apache license at the top.
Minor spacing nit:
{code}
+ HConstants.ROOT_TABLE_NAME) ==0
{code}
Is capitalization of 'NO' intentional? also minor spacing nit.
{code}
- if (status == null) return null;
+ if (status == null) throw new TableInfoMissingException("NO .tableinfo
file under " +tableDir.toUri());
{code}
Don't think this change is necessary
{code}
- @Test public void testReadingHTDFromFS() throws IOException {
+ @Test public void testReadingHTDFromFS() throws IOException,
NullPointerException{
final String name = "testReadingHTDFromFS";
{code}
> 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
> Assignee: Jie Huang
> Attachments: hbase-6516.patch, hbase-6516-v2.patch,
> hbase-6516-v3.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
For more information on JIRA, see: http://www.atlassian.com/software/jira