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

Aditya Kishore commented on HBASE-6236:
---------------------------------------

@Jimmy

Currently there are two different locations where hbck sidelines the backup 
data.

First one takes the form '/hbck/hbase-xxxxxx' and is used to sideline regions

{code:title=HBaseFsck.java}
857       private Path getSidelineDir() throws IOException {
858         Path hbaseDir = FSUtils.getRootDir(conf);
859         Path hbckDir = new Path(hbaseDir.getParent(), "hbck");
860         Path backupDir = new Path(hbckDir, hbaseDir.getName() + "-"
861             + startMillis);
862         return backupDir;
863       }
{code}

While the second one takes the form of '/hbase-xxxxx' and is used to sideline 
the current .META. and \-ROOT\- folders

{code:title=HBaseFsck.java}
960         Path backupDir = new Path(hbaseDir.getParent(), hbaseDir.getName() 
+ "-"
961             + startMillis);
{code}

At lease we need to make them standard.

Secondly, I am not sure how pre-creating "/hbck" will solve this problem in a 
federated HDFS in all cases. Suppose the root of a cluster is mounted as 
"/hbase" in ViewFS then the pre created "/hbck" folder is going to be on a 
different namespace volume and renaming of a file from "/hbase/" to "/hbck/" is 
going to fail.
                
> Offline meta repair fails if the HBase base mount point is on a different 
> cluster/volume than its parent in a ViewFS or similar FS
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-6236
>                 URL: https://issues.apache.org/jira/browse/HBASE-6236
>             Project: HBase
>          Issue Type: Bug
>          Components: hbck
>            Reporter: Aditya Kishore
>            Assignee: Aditya Kishore
>             Fix For: 0.96.0, 0.94.1
>
>         Attachments: 6236_trunk.patch, HBASE-6236_94.patch, 
> HBASE-6236_trunk.patch, HBASE-6236_trunk.patch
>
>
> While building the .META. and -ROOT- from FS data alone (HBASE-4377), hbck 
> tries to move the existing .META. and -ROOT- directories to a backup folder.
> This backup folder is created at the same level as the base HBase folder 
> (e.g. /hbase-xxxxxx if the base HBase folder is '/hbase').
> In a federated HDFS like ViewFS and other similar FS implementations, it is 
> not possible to rename files/directories across namespace volumes (ViewFS 
> guide section 3.5) and as a result hbck crashes.
> A solution to this problem is to create the backup directory under the folder 
> where HBase base folder has been mounted. This ensures that source and 
> destination of rename operation are on the same namespace volume.
> Patch for 0.94 and trunk is attached for review. The patch modifies the 
> location of the backup directory from '/hbase-xxxxxxx' to 
> '/hbase/.hbcktmp-xxxxxxx'

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