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

Ted Yu commented on HBASE-4377:
-------------------------------

The code in HRegion which creates region directory is scattered in 
createHRegion(), etc.
To reuse the code, we need to separate it into its own method.

MetaReader.fullScanMetaAndPrint() doesn't return the number of rows in .META.
We can enhance it by returning the count.

For fs.rename(), we end up calling DFSClient where the return value's javadoc 
says:
{code}
   * @return true if successful, or false if the old name does not exist
   * or if the new name already belongs to the namespace.
{code}
We should add checking for return value from fs.rename(). But it seems catching 
IOException is useful defense against unexpected situation as well.
                
> [hbck] Offline rebuild .META. from fs data only.
> ------------------------------------------------
>
>                 Key: HBASE-4377
>                 URL: https://issues.apache.org/jira/browse/HBASE-4377
>             Project: HBase
>          Issue Type: New Feature
>    Affects Versions: 0.92.0
>            Reporter: Jonathan Hsieh
>            Assignee: Jonathan Hsieh
>         Attachments: 
> 0001-HBASE-4377-hbck-Offline-rebuild-.META.-from-fs-data-.0.90-v4.patch, 
> 0001-HBASE-4377-hbck-Offline-rebuild-.META.-from-fs-data-.0.90.v3.patch, 
> 0001-HBASE-4377-hbck-Offline-rebuild-.META.-from-fs-data-.patch, 
> 0001-HBASE-4377-hbck-Offline-rebuild-.META.-from-fs-data-.trunk.v3.patch, 
> 0001-HBASE-4377-hbck-Offline-rebuild-.META.-from-fs-data.0.92.v1.patch, 
> 0001-HBASE-4377-hbck-Offline-rebuild-.META.-from-fs-data.0.92.v2.patch, 
> EXT_AC.regioninfo, EXT_ATU_05f84d32cbc0bdabf00e00bc2f3570f0.regioninfo, 
> hbase-4377-trunk.v2.patch, hbase-4377.trunk.v3.txt, hbase-4377.trunk.v4.txt, 
> hbase-4377.trunk.v5.txt
>
>
> In a worst case situation, it may be helpful to have an offline .META. 
> rebuilder that just looks at the file system's .regioninfos and rebuilds meta 
> from scratch.  Users could move bad regions out until there is a clean 
> rebuild.  
> It would likely fill in region split holes.  Follow on work could given 
> options to merge or select regions that overlap, or do online rebuilds.

--
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